Dim objRegex
Set objRegex = New RegExp
objRegex.Global = True
objRegex.Multiline = True
'objRegex.Pattern = "<div>([^<]*)(<[^<]*)</div>"
objRegex.Pattern = "<div>([\s\S]*?)</div>"
str = "<div>123" & vbCrLf & vbTab & "456" & "</div></div>"
'str = "<div>123</div>"
Set objMatches = objRegex.Execute(str)
MsgBox objMatches.Item(0).Submatches.Item(0)
Set objRegex = Nothing
Title:
VBScript RegExp Pattern Multiple Lines
Description:
Dim objRegex Set objRegex = New RegExp objRegex.Global = True objRegex.Multiline = True 'objRegex.Pattern = "<div>([^<...
...
Rating:
4