写了个正则表达式匹配的东西,用到的也就这几个函数了
复制代码 代码如下:
<%
str = request("str")
reg = request("reg")
set regex = new RegExp
With regex
.Pattern = reg
.IgnoreCase = False
.Global = True
End With
Set match = regex.Execute(str)
If match.Count > 0 Then
For Each matched in match
Response.Write " 位置: " & matched.FirstIndex & " 长
度:"&matched.Length&"
"
Next
Else
Response.Write "" & regex.Pattern & " 没有找到匹配"
End If
Set regex = nothing
%>
关于具体的正则表达式函数
https://www.0133.cn/article/20816.htm
以上就是ASP正则表达式技巧的详细内容,更多请关注0133技术站其它相关文章!