源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

asp 正则 过滤重复字符串的代码

  • 时间:2020-06-15 05:39 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:asp 正则 过滤重复字符串的代码
比如 1223445677777778aabbcccccccccc 经过过滤之后就是12345678abc
[u]复制代码[/u] 代码如下:
<% '过滤重复 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) %>
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部