日期:2014-05-17  浏览次数:20819 次

js用test测试格式,那asp呢
有类似的用正则测试格式的方法吗

------解决方案--------------------
Function RegExpTest(patrn, strng)
Dim regEx, Match, Matches ' 建立变量。
Set regEx = New RegExp ' 建立正则表达式。
regEx.Pattern = patrn ' 设置模式。
regEx.IgnoreCase = True ' 设置是否区分字符大小写。
regEx.Global = True ' 设置全局可用性。
RegExpTest = regEx.test(strng)
End Function
response.Write(RegExpTest( "[0-9] ",123))