Function RegExpTest(patrn, strng)
Dim regEx, Match, Matches ' Create variable.
Set regEx = New RegExp ' Create a regular expression.
regEx.Pattern = patrn ' Set pattern.
regEx.IgnoreCase = True ' Set case insensitivity.
regEx.Global = True ' Set global applicability.
Set Matches = regEx.Execute(strng) ' Execute search.
For Each Match in Matches ' Iterate Matches collection.
msgbox Match.value'&" "&Match.firstindex
Next
RegExpTest = RetStr
End Function作者: 风雪夜归人 时间: 2010-1-18 11:54
哈哈,lz一定吃胖了。。学习学习。。作者: 风雪夜归人 时间: 2010-1-18 13:21
RegExpTest "[\(\)\+/\*\-<>]|(\d+\.\d+)|(\d+)|([\u4e00-\u9fa5]+)", str