亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

asp 正則 過濾重復(fù)字符串的代碼

 更新時(shí)間:2009年10月12日 15:13:42   作者:  
asp下過濾重復(fù)字符串的代碼,有時(shí)候我們需要過濾一些重復(fù)的字符串,下面的代碼即可解決這個(gè)問題。
比如 1223445677777778aabbcccccccccc 經(jīng)過過濾之后就是12345678abc
復(fù)制代碼 代碼如下:

<%
'過濾重復(fù)
Function norepeat(Str)
Dim RegEx
If IsNull(Str) Or Str="" Then Exit Function
Set RegEx=New RegExp
RegEx.Global = True
RegEx.IgnoreCase=True
RegEx.MultiLine = True
RegEx.pattern="(.)\1+"
str=regEx.replace(str,"$1")
Set RegEx=Nothing
Norepeat=str
End Function
'示例
s="1223445677777778aabbcccccccccc"
response.write Norepeat(s)
%>

相關(guān)文章

最新評(píng)論