Quantcast
Channel: Micro Focus QTP (UFT) Forums - All Forums
Viewing all articles
Browse latest Browse all 1653

Find pattern for series from 1287 to 9834

$
0
0
I have created pattern like this. but it is giving me incorrect result. Please help me with this.

Code:
patrn="([1][2-9][0-9][0-9]|[9][8-9][0-3][0-3]|9834)"
strng1=1286
Dim regEx, retvalb4                    ' Create variable.
Set regEx = New RegExp             ' Create regular expression.
regEx.Pattern = patrn                  ' Set pattern.
regEx.IgnoreCase = False             ' Set case sensitivity.
regEx.global=true
retvalb4 = regEx.Test(strng1)      ' Execute the search test.
msgbox retvalb4


Smile

Viewing all articles
Browse latest Browse all 1653

Trending Articles