VBScript程序员参考手册 第3版
Sub 正则表达式() Dim regExp As Object Dim x As String x = "some long string with http://www.wrox.com buried in it." Set regExp = CreateObject("vbscript.regexp") regExp.Pattern = "\d" regExp.IgnoreCase = True If regExp.test(x) Then MsgBox "Yes" Else MsgBox "No" End If 'x = regExp.Replace(x, "#") End Sub