vbs正则取出一段文本里的所有图片的地址
vbs正则取出一段文本里的图片的地址,基本上都是 <img src= "dsafdsafasfd " ...> 这样的格式
因为我的编辑环境是ASP所以,要用vbs正则,
先谢谢了
------解决方案-------------------- <script language=vbscript>
dim str
str= " <img src= " "dsafdsafasfd " " ...> "
msgbox str
Dim re, rv
Set re = new RegExp
re.Pattern = "\ <img(.+?)src\=([^\s]+?)(\s|\> ) "
re.Global = True
re.IgnoreCase = false
re.MultiLine = false
Set rv = re.Execute(str)
msgbox rv.count
For Each Match in rv ' 遍历匹配集合。
msgbox Match.SubMatches(1)
Next
</script>