Sub test1()
Dim re As IRegExp, m As Object
Set re = New IRegExp
re.Pattern = "(?<numbers>123).+?(?<chars>abc).+?(?<sign>@@@)"
re.GlobalSearch = True
Set m = re.Execute("123 abc @@@")
Debug.Print " Match count: "; m.count
Debug.Print " Match Text: "; m(0)
Debug.Print " Match - FirstIndex: "; m(0).FirstIndex
Debug.Print " Match - LastIndex: "; m(0).LastIndex
Debug.Print " SubMatch[1]: "; m(0).SubMatches(1)
Debug.Print "SubMatch - FirstIndex: "; m(0).SubMatchFirstIndex(1)
Debug.Print " SubMatch - LastIndex: "; m(0).SubMatchLastIndex(1)
Debug.Print " SubMatch['numbers']: "; m(0).SubMatches(re.IndexByName("numbers"))
End Sub