Micro Focus QTP (UFT) Forums
Regular expression to read two words in lowercase, uppercase and with and without spa - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Regular Expressions (https://www.learnqtp.com/forums/Forum-UFT-QTP-Regular-Expressions)
+--- Thread: Regular expression to read two words in lowercase, uppercase and with and without spa (/Thread-Regular-expression-to-read-two-words-in-lowercase-uppercase-and-with-and-without-spa)



Regular expression to read two words in lowercase, uppercase and with and without spa - sarahq49 - 04-08-2015

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


RE: Regular expression to read two words in lowercase, uppercase and with and without spa - sarahq49 - 04-09-2015

I think I got it.

(?i)Hello\s?there