FunctionRegExpTest(patrn,strng)
DimregEx,Matches
SetregEx=NewRegExp
regEx.Pattern=patrn
regEx.IgnoreCase=True‘为真则忽略大小写,否则严格匹配大小写
regEx.Global=True
SetMatches=regEx.Execute(strng)
RegExpTest=Matches.count
EndFunction
MsgBox(RegExpTest("is.","IS1is2IS3is4"))