实现代码如下:

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

以上就是【得到连接和图片的地址 正则】的全部内容了,欢迎留言评论进行交流!

赞(0) 踩(0)

与本文相关的软件

发表我的评论

最新评论

  1. 暂无评论