复制代码 代码如下:
<%
'过滤重复
Functionnorepeat(Str)
DimRegEx
IfIsNull(Str)OrStr=""ThenExitFunction
SetRegEx=NewRegExp
RegEx.Global=True
RegEx.IgnoreCase=True
RegEx.MultiLine=True
RegEx.pattern="(.)1+"
str=regEx.replace(str,"$1")
SetRegEx=Nothing
Norepeat=str
EndFunction
'示例
s="1223445677777778aabbcccccccccc"
response.writeNorepeat(s)
%>