Micro Focus QTP (UFT) Forums
regular expressions - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: regular expressions (/Thread-regular-expressions--6449)



regular expressions - ajayr1982 - 06-08-2012

Hi,
i have a situation described below

i have an object webelement
inner text="loanno 1234 green"
the number 1234 is not constant as it changes for every time i log in.

i want to regularise the inner text so that i can uniquely identify the object.

there are many object with inner text as loanno.

i want to regularise only the number 1234.

how do i do it ?



RE: regular expressions - sshukla12 - 06-08-2012

Hi,
Tyr this:
loanno\d{n}green
where n is length of numeric string

Regards,
Sankalp


RE: regular expressions - Ankesh - 06-08-2012

you can try

^loanno [0-9]+ green$

Regards,
Ankesh