问题
I just want to match the first instance, could anyone let me know how you would go about doing this?
'RegEx to get Image
Dim re, matches, Img
Set re = new RegExp ' creates the RegExp object
re.IgnoreCase = true
re.Global = true
re.Pattern = "<img.*(.|\n)*?/>"
Set Matches = re.Execute(string)
Img = ""
For each Item in Matches
Img = Item.Value
Next
回答1:
The Global property should be false, rather than true.
The property is described at http://msdn.microsoft.com/en-us/library/tdte5kwf(v=VS.85).aspx.
来源:https://stackoverflow.com/questions/8519144/regex-in-classic-asp-vb