Micro Focus QTP (UFT) Forums
Help with using Regular expressions - particularly caret - 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: Help with using Regular expressions - particularly caret (/Thread-Help-with-using-Regular-expressions-particularly-caret)



Help with using Regular expressions - particularly caret - poona13 - 03-25-2008

I have two links on the page with the same text and href. But the class property is different.
I was trying to use the caret to match only the beginning of the class(which is a long string with alphanumeric characters, spaces,and hyphens). It starts with zz1 for the link that I want to use.
But it is not working.
I tried this:
Code:
Browser("xyz").Page("url:=http://xyz").Link("html tag:=A", "text:=Projects", "class:=^zz1").Click



RE: Help with using Regular expressions - particularly caret - Ankur - 03-25-2008

I don't see any problem with the above expression... may be some other issue

You can check your regular expression at http://www.nvcc.edu/home/drodgers/ceu/resources/test_regexp.asp