vbs正则表达式 对网址

前端之家收集整理的这篇文章主要介绍了vbs正则表达式 对网址前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
Dim re,s,colMatches,match Set re = New RegExp re.Global = True re.Pattern = "http://(\w+[\w-]*\w+\.)*\w+" s = "http://www.kingsley-hughes.com is a valid web address. And so is " s = s & vbCrLf & "http://www.wrox.com. And " s = s & vbCrLf & "http://www.pc.ibm.com - even with 4 levels." Set colMatches = re.Execute(s) For Each match In colMatches MsgBox "Found valid URL: " & match.Value Next dim re,s set re= new RegExp re.Pattern = "France" s = "The rain in France falls mainly on the plains." msgBox re.replace(s,"Spain") 原文链接:https://www.f2er.com/regex/360882.html

猜你在找的正则表达式相关文章