I am trying to use RegEx to get blocks of data from a multi-line string.
String to search
***** a.txt 17=xxx 570=N 55=yyy ***** b.TXT 17=XXX 570=Y 55=yyy ***** ***** a.txt 38=10500.000000 711=1 311=0000000006630265 ***** b.TXT 38=10500.000000 311=0000000006630265 *****
What I need - anything between ***** block
17=xxx 570=N 55=yyy 17=XXX 570=Y 55=yyy 38=10500.000000 711=1 311=0000000006630265 38=10500.000000 311=0000000006630265
My code so far
Set objRegEx = CreateObject("VBScript.RegExp")
objRegEx.Global = True
objRegEx.MultiLine = True
objRegEx.IgnoreCase = True
objRegEx.Pattern = "\*\*\*\*\*(?:.|\n|\r)*?\*\*\*\*\*"
Set strMatches = objRegEx.Execute(objExec.StdOut.ReadAll())
If strMatches.Count > 0 Then
For Each strMatch In strMatches
Wscript.Echo strMatch
Next
End If
Set objRegEx = Nothing