关于VB中正则表达式的问题
Function TestRegExp(myPattern As String, myString As String)Dim objRegExp As RegExp
Dim objMatch As Match
Dim colMatches As MatchCollection
Dim RetStr As String
Set objRegExp = New RegExp
objRegExp.Pattern = myPattern
objRegExp.IgnoreCase = True
objRegExp.Global = True
If (objRegExp.Test(myString) = True) Then
Set colMatches = objRegExp.Execute(myString)
For Each objMatch In colMatches
——————————————————
怎么在这个位置加入一个循环,把
objmatch.value返回的值写入一个数组呢?
——————————————————
Next
Else
RetStr = "String Matching Failed"
End If
TestRegExp = RetStr
End Function