QTP Forums

Full Version: Regular Expression- For a Numeric
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
objRegExpr.Pattern = "[4][0-9]{5}|5000000"

Regards
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

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

Regards
you can specify like
4\d\d\d\d\d/500000 which will always check for 400000 to 500000
Reference URL's