I have a VBS regex code
Dim re, targetString, colMatch, objMatch
Set re = New RegExp
With re
.Pattern = "rain(.*)"
.Global = True
.IgnoreCase = True
End With
targetString = "The rain in Spain falls mainly in the plain"
Set colMatch = re.Execute(targetString)
For each objMatch in colMatch
wscript.echo objMatch.Value & "<br />"
Next
It returns "rain in Spain falls mainly in the plain" But I need the "in Spain falls mainly in the plain" to be returned" Usually what is in brackets should be returned, and not what is behind the brackets Which way to do it correct?