Jump to the post that solved this thread.
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Find pattern for series from 1287 to 9834
#1
Solved: 8 Years, 9 Months ago
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
Reply
Jump to the post that solved this thread.


Messages In This Thread
Find pattern for series from 1287 to 9834 - by abhideshpande001 - 07-28-2015, 06:53 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)