日期:2014-05-17 浏览次数:20775 次
Dim re Set re=New RegExp re.IgnoreCase=True re.Global=True re.Pattern="<a href=(?<url>.+?) target=_blank>(?<title>.+?)</a>" Set RegExpGetHtml=re.Execute(strhtml)
Set matches=re.Execute(strhtml) for each mc in matches response.Write mc.submatches(0)'第一组 next
------解决方案--------------------
既然asp不支持捕获组命名,那你可以这样啊
Set matches=re.Execute(strhtml) for each mc in matches response.Write mc.submatches(0)'第一组 next
------解决方案--------------------
Function RegRemoveHref(HTMLstr)
Set ra = New RegExp
ra.IgnoreCase = True
ra.Global = True
ra.Pattern = "<A[^>]+>(.+?)</A>"
RegRemoveHref = ra.replace(HTMLstr,"$1")
END Function
------解决方案--------------------
asp javascript 中的正则均不支持命名捕获组