复制代码 代码如下:
<%
function replaceurl2(htmlstr)
dim n,str1,str2,str3,str4
htmlstr = lcase(htmlstr)
for n=1 to ubound(split(htmlstr,"<a"))
str1 = instr(htmlstr,"<a")
str2 = instr(str1,htmlstr,">")
htmlstr = left(htmlstr,str1-1)&right(htmlstr,len(htmlstr)-len(left(htmlstr,str2)))
htmlstr = replace (htmlstr,"</a>","")
replaceurl2 = htmlstr
next
end function
%>
正则表达式去除链接:
复制代码 代码如下:
function regremovehref(htmlstr)
set ra = new regexp
ra.ignorecase = true
ra.global = true
ra.pattern = "<a[^>]+>(.+?)</a>"
regremovehref = ra.replace(htmlstr,"$1")
end function
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:)!