源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

asp下去除超链接的函数

  • 时间:2021-10-27 01:32 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:asp下去除超链接的函数
[u]复制代码[/u] 代码如下:
<% 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 %>
正则表达式去除链接:
[u]复制代码[/u] 代码如下:
Function RegRemoveHref(HTMLstr) Set ra = New RegExp ra.IgnoreCase = True ra.Global = True ra.Pattern = "<A[^>]+>(.+?)<\/A>" RegRemoveHref = ra.replace(HTMLstr,"$1") END Function
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部