得到连接和图片的地址 正则
摘要:复制代码代码如下:functionAddSiteURL(ByValStr)IfIsNull(Str)ThenAddSiteURL=""Exi...
复制代码 代码如下:
functionAddSiteURL(ByValStr)
IfIsNull(Str)Then
AddSiteURL=""
ExitFunction
EndIf
Dimre
Setre=newRegExp
Withre
.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""")
EndWith
Setre=Nothing
AddSiteURL=Str
EndFunction
【得到连接和图片的地址 正则】相关文章:
★ 只能是字母或数字或者是字母和数字的组合的正则previousSibling
上一篇:
密码强度检测函数(正则)