这样的正则表达式怎么写
<A href= "file:///C:/Documents%20and%20Settings/Administrator.DBVYSKQ1KC1O3BZ/桌面/论坛签名档图/论坛签名档图/2142副本.jpg " target=_blank> <IMG src= "file:///C:/Documents%20and%20Settings/Administrator.DBVYSKQ1KC1O3BZ/桌面/论坛签名档图/论坛签名档图/2142副本.jpg " onload=resizeImg(this,500) border=0> </A>
我要从上面的html里把图片的本地路径和文件名找出来,怎么写正则?
我要的就是: C:/Documents%20and%20Settings/Administrator.DBVYSKQ1KC1O3BZ/桌面/论坛签名档图/论坛签名档图/2142副本.jpg
------解决方案--------------------s = " <A href= " "file:///C:/Documents%20and%20Settings/Administrator.DBVYSKQ1KC1O3BZ/桌面/论坛签名档图/论坛签名档图/2142副本.jpg " " target=_blank> <IMG src= " "file:///C:/Documents%20and%20Settings/Administrator.DBVYSKQ1KC1O3BZ/桌面/论坛签名档图/论坛签名档图/2142副本.jpg " " onload=resizeImg(this,500) border=0> </A> "
Set regEx = New RegExp
regEx.Pattern = "(?:src|href)= " "(file:///)?([^ " "]*) " " "
regEx.IgnoreCase = True
regEx.Global = True
Set Matches = regEx.Execute(s)
Response.Write Matches.Count
For Each Match in Matches ' Iterate Matches collection.
Response.Write Match.SubMatches(1)& " <br> " & vbCRLF
Next