RegReplace(str,regexStr,RepalceStr) 对str 进行正则替换

如:

htmlstr = "123<img src=""asdf.gif"" border=""0"">45<b>6</b>"
htmlstr2 = RegReplace(htmlstr,"<(.[^><]*)>","")

返回 Htmlstr2 为123456

Function RegReplace(Str,PatternStr,RepStr)
 Dim NewStr,regEx
 NewStr = Str
 if isnull(NewStr) then
  RegReplace = ""
  exit function
 end if
 Set regEx = New RegExp
 regEx.IgnoreCase = True
 regEx.Global = True
 regEx.Pattern=PatternStr
 NewStr = regEx.Replace(NewStr,RepStr)
 RegReplace = NewStr
end function

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-24
  • 2021-12-23
  • 2021-07-21
猜你喜欢
  • 2022-01-01
  • 2021-08-20
  • 2021-10-07
  • 2022-01-29
  • 2021-11-08
  • 2022-02-24
  • 2022-12-23
相关资源
相似解决方案