VBScript code
'==================================================
'*函数名 : GetHrefFromContent
'*参数说明 : html asp截取文本连接地址。
'*功能简介 : 获取代码中的链接地址
'==================================================
function GetHrefFromContent(html)
Dim Re, match, matchs,strContent,aryNum,aryContent,strUrl
strContent = ""
set Re = new RegExp
re.IgnoreCase =True
re.Global = True
re.Pattern = "<a.*?href=(?:""(.*?)""|(.*?))(?:(?: .*?>)|>)(.*?)</a>"
Set matchs = re.Execute(html)
for each match in matchs
'match.SubMatches(0) 基本 0 可改成数组里的其它成员
strContent = strContent + (match.SubMatches(0)) & "|$|"
next
set matchs = nothing
aryContent = split(strContent,"|$|")
for aryNum = LBound(aryContent) to UBound(aryContent)
strUrl = aryContent(aryNum) '连接地址
next
end function
asp网站建设的截取连接地址功能,你学会了吗?