Function RegExpTest(patrn, col, tocol)
Dim regex, myrange, i, c, matches, match, str ' 建立变量。
Set regex = CreateObject("vbscript.regexp") ' 建立正则表达式。
regex.Pattern = patrn ' 设置模式。
regex.IgnoreCase = True ' 设置不区分字符大小写。
regex.Global = True ' 设置全局可用性。
Set myrange = ActiveSheet.Range(col & ":" & tocol) '获取分析数据
For Each c In myrange
i = c.Row
Column = c.Column
If regex.Test(c.Value) Then
Se......
阅读全文