欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

ASP正則表達(dá)式技巧

 更新時(shí)間:2008年11月10日 00:24:45   作者:  
寫了個(gè)正則表達(dá)式匹配的東西,用到的也就這幾個(gè)函數(shù)了

復(fù)制代碼 代碼如下:

<%
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 "<B><input value=" & matched.Value & " ></B> 位置: <B>" & matched.FirstIndex & "</B> 長

度:"&matched.Length&"<BR>"
Next

Else
Response.Write "<B>" & regex.Pattern & "</B> 沒有找到匹配"
End If

Set regex = nothing
%>

<form method=post>
text:<br>
<textarea cols=50 rows=10 name="str"><%=str%></textarea><br>
regexp:<input name="reg" value="<%=reg%>"><br>
<input type=submit value="regexp">
</form>

關(guān)于具體的正則表達(dá)式函數(shù)
http://www.dbjr.com.cn/article/20816.htm

相關(guān)文章

最新評(píng)論