方法二:找到匹配的进行替换

ip="127.0.0.1"

Function ReplaceTest(str,patrn, replStr) 
	Dim regEx, str1 
	Set regEx = New RegExp 
	regEx.Pattern = patrn 
	regEx.IgnoreCase = True 
	ReplaceTest = regEx.Replace(str, replStr) 
End Function
response.write(ReplaceTest(ip,"\d+", "cat"))

  

资料参考:

asp正则表达式常用方法 http://webcenter.hit.edu.cn/articles/2010/06-06/06173737.htm

相关文章:

  • 2022-02-13
  • 2022-03-07
  • 2022-12-23
  • 2021-10-05
  • 2022-12-23
  • 2021-12-25
  • 2021-12-18
猜你喜欢
  • 2021-08-29
  • 2021-10-11
  • 2021-04-06
  • 2022-02-01
相关资源
相似解决方案