熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> .NET編程 >> 正文

刪除重復字符js代碼

2022-06-13   來源: .NET編程 

  刪除重復字符js代碼
>

  <script type="text/vbscript">
        <!
            dim str
            str="您好歡迎來到"
            set regex = new regexp
            regexpattern = "(({}?){})"
            regexglobal = true
            regexignorecase = true
            set matches = regexexecute(str)   執行搜索
  for each match in matches      循環遍歷matches集合
    alert("重復的字符:" & matchsubmatches())
    alert("整個重復的字符:" & matchsubmatches())
  next

  //>
        </script>


From:http://tw.wingwit.com/Article/program/net/201311/14474.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.