Private Sub Command1_Click()
Dim txt As String
txt ="11:Feb:2019 ""This is an Example!"""
Dim re1 As String
re1 =".*?"
Dim re2 As String
re2 ="(b)"
Dim r As New RegExp
r.Pattern = re1+re2
r.IgnoreCase = True
Dim m As MatchCollection
Set m = r.Execute(txt)
If m.Item(0).SubMatches.Count > 0 Then
Dim w1
w1=m.Item(0).SubMatches.Item(0)
MsgBox("("+w1+")"+"")
End If
End Sub
|