07-28-2015, 06:53 AM
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