Micro Focus QTP (UFT) Forums
Regular Expression- For a Numeric - 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- For a Numeric (/Thread-Regular-Expression-For-a-Numeric)



Regular Expression- For a Numeric - rajeshvelur - 10-17-2008

I have a situation to use regular expression.
The number is dynamic for example 445780.
I want use regular expression and make it fall between 2 numbers say for example (400000-500000).

How can i do that, please i need your help.
Thanks


RE: Regular Expression- For a Numeric - kishoreinchennai - 10-17-2008

Code:
objRegExpr.Pattern = "[4][0-9]{5}|5000000"

Regards


RE: Regular Expression- For a Numeric - rajeshvelur - 10-17-2008

Thanks a lot kishore,
Hope you are helping a lot to guys like me who are beginners in QTP.

I could understand your answer, but the scenario is like this
I need to use the above code for
"Found 4643000 companies"
And this forms the check point in my script.
How can i use your code in the above scenario?

Thanks


RE: Regular Expression- For a Numeric - surya_7mar - 11-29-2008

you can specify like
4\d\d\d\d\d/500000 which will always check for 400000 to 500000