zoukankan      html  css  js  c++  java
  • [asp]替换连续多个回车换行

    '格式化字符串
    function strformat(str)
      strformat
    =str
      
    Dim regEx, Match, Matches      ' 建立变量。
      Set regEx = New RegExp         ' 建立正则表达式。
      regEx.Pattern = "["&vbcrlf&"]+"         ' 设置模式。
      regEx.IgnoreCase = True         ' 设置是否区分字符大小写。
      regEx.Global = True         ' 设置全局可用性。
      Set Matches = regEx.Execute(str)   ' 执行搜索
      For Each Match in Matches      ' 遍历匹配集合。
        strformat = replace(strformat,Match.Value,"<br/>")
      
    Next
    end function

    以上函数利用正侧表达式将多个连续的回车换行替换成一个<br/>

  • 相关阅读:
    codeforces
    hdu
    hdu
    poj 2823
    hdu
    hdu
    hdu
    微信公众号 SDK
    PHP 正则表达式
    注册和登录时的验证码
  • 原文地址:https://www.cnblogs.com/nasdaqhe/p/954108.html
Copyright © 2011-2022 走看看