无法在 VBScript_Regex_55 上找到文档

Unable to find documentation on VBScript_Regex_55

基本上我一直在通读this。我想要找到的是如何提取组中模式的特定部分。

例如,假设我想要使用以下模式来查找电子邮件,并且我想要使用以下模式专门检索电子邮件的域:([\w.-]+)@([\w.-]+.\w+).

我知道我可以在模式的第一组上使用前瞻,但是为了检索“@”之前的电子邮件部分,我需要再次重写相同的代码,这不是很干。

抱歉教程是法语的:http://cafeine.developpez.com/access/tutoriel/regexp/
测试我从这个 link 过去的这段代码:

Sub testRegEx()
Dim reg As VBScript_RegExp_55.regexp
Dim Match As VBScript_RegExp_55.Match
Dim Matches As VBScript_RegExp_55.MatchCollection

' instanciation
Set reg = New VBScript_RegExp_55.regexp

reg.Pattern = "([\w.-]+)@([\w.-]+.\w+)"
Set Matches = reg.Execute("email@test.com")
For Each Match In Matches
    Debug.Print "source >>", Match.Value
    For i = 0 To Match.SubMatches.Count - 1
        Debug.Print "[$" & i + 1 & "]", Match.SubMatches(i)
    Next i
Next Match
End Sub