页面导航: 首页网络编程正则表达式 → 正文内容

得到连接和图片的地址 正则

发布:dxy 字体:[增加 减小] 类型:转载

function AddSiteURL(ByVal Str)
  If IsNull(Str) Then
      AddSiteURL = ""
      Exit Function 
  End If
  Dim re
  Set re=new RegExp
  With re
    .IgnoreCase =True
    .Global=True
    .Pattern="<img (.*?)src=""(?!(http|https)://)(.*?)"""
    str = .replace(str,"<img $1src=""" & SiteURL & "$3""")
    .Pattern="<a (.*?)href=""(?!(http|https|ftp|mms|rstp)://)(.*?)"""
    str = .replace(str,"<a $1href=""" & SiteURL & "$3""")
  End With
  Set re=Nothing
  AddSiteURL=Str
End Function
百度中搜索更多的关于得到连接和图片的地址 正则内容,或者用Google搜索相关更多
浏览次数:载入中... 打印本文关闭本文返回首页

文章评论

共有 位脚本之家网友发表了评论我来说两句

同 类 文 章
最 近 更 新
热 点 排 行