发布网友 发布时间:2024-10-23 21:18
共1个回答
热心网友 时间:2024-10-29 06:17
Function bTest(ByVal s As String, ByVal p As String) As Boolean
Dim re As RegExp
Set re = New RegExp
re.IgnoreCase = True '设置是否匹配大小写
re.Pattern = p
re.Global = True
bTest = re.Test(s)
End Function
这个是用正则判断字符串S中是否有匹配格式P,有就返回TRUE,没有就是FALSE