08-24-2011, 03:24 PM
Maybe a simple question, so apologies in advance.
I have the following:
I get a popup saying that it is found
i presume that the correct way to get the string is something like
this sets string to true, but i want string to be set to TO-001-A-01
but I don't know which function will return the found pattern?
Does anyone know how to assign the found pattern to the variable?
I have the following:
Code:
response ="blablahTO-001-A-01blahblablah"
Set oRegExp = New RegExp
oRegExp.IgnoreCase = True
oRegExp.Global=False
oRegExp.Pattern="([A-Z]{2})-([0-9]{3})-([A-Z]{1})-([0-9]{2})"
Msgbox oRegExp.Test(response)
I get a popup saying that it is found
i presume that the correct way to get the string is something like
Code:
string = oRegExp.Test(response)
but I don't know which function will return the found pattern?
Does anyone know how to assign the found pattern to the variable?