Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Regular expression to read two words in lowercase, uppercase and with and without spa
#1
Hi,

I’m new to QTP and regular expression. How do I write a regular expression so it can read the following?
Hello THere
hello THERE
HeLLO tHerE
herethere
HELLOTHERE
ABCDE

I’ve come up with the following, but this doesn’t take care of “HELLOTHERE” or “hellothere”?
[Hh][Ee][Ll]{2}[Oo]\s[Tt][Hh][Ee][Rr][Ee]

Any help will be appreciated. Is there a better way to write this?
Thanks
Reply
#2
I think I got it.

(?i)Hello\s?there
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Need Any digit in xpath path using Regular expression Priyam 1 4,063 10-05-2016, 11:05 AM
Last Post: Ankur
  Regular expression and script optimisation Padmavathy 1 4,394 03-30-2015, 11:46 AM
Last Post: supputuri
  Regular expression in descriptive programming testernc 1 17,092 12-08-2014, 06:38 PM
Last Post: anshika.agarwal
  need a regular expression. anu05446 0 3,455 11-26-2014, 03:00 PM
Last Post: anu05446
Rolleyes Help Required : In Understanding the regular expression arescool 0 3,261 08-15-2013, 08:59 AM
Last Post: arescool

Forum Jump:


Users browsing this thread: 1 Guest(s)