setha
13 years agoNew Contributor
VBScript and RegEx objects?
Hello,
I'm trying to use regular expressions from vbscript using TestComplete 8.6. The following code snippet returns syntax error complainign about "As":
I'm trying to use regular expressions from vbscript using TestComplete 8.6. The following code snippet returns syntax error complainign about "As":
Dim r As New Regex( "Total[\s\S][\d.:]*", _RegexOptions.IgnoreCase)
When I try to do it this way:
Dim r
r = New Regex("Total[\s\S][\d.:]*", _RegexOptions.IgnoreCase)
I get a syntax error complaining about "New"
This syntax is from the MS vbscript language reference which is linked from the TestComplete help.
How does one create a new RegEx object using VBScript in TestComplete?
Thanks!