Below I has a sample test case where I want to just grab the Saturday value if the word Blah appears before it. Below is what I got, but for some reason I end up getting "Blah" included. Any help would be great. Thanks!
Sub regex_practice()
Dim pstring As String
pstring = "foo" & vbCrLf & "Blah" & vbCrLf & vbCrLf & "Saturday"
'MsgBox pstring
Dim regex As Object
Set regex = CreateObject("VBScript.RegExp")
With regex
.Pattern = "(?:Blah)((.|\n)*)Saturday"
.Global = True 'If False, would replace only first
End With
Set matches = regex.Execute(pstring)