您现在的位置: 万盛学电脑网 >> 程序编程 >> 网络编程 >> asp编程 >> 正文

删除重复字符js代码

作者:佚名    责任编辑:admin    更新时间:2022-06-22

删除重复字符js代码
-->

  <script type="text/vbscript">
        <!--
            dim str
            str="您好,欢迎来到三联"
            set regex = new regexp
            regex.pattern = "((.{1,3}?)2{2,})"
            regex.global = true
            regex.ignorecase = true
            set matches = regex.execute(str)   ' 执行搜索。
  for each match in matches      ' 循环遍历matches集合。
    alert("重复的字符:" & match.submatches(1))
    alert("整个重复的字符:" & match.submatches(0))
  next

        //-->
        </script>