Function ReplaceTest(patrn,replStr,str1) '任意正则函数
Dim regEx
Set regEx = New RegExp ' 建立正则表达式。
regEx.Pattern = patrn ' 设置模式。
regEx.IgnoreCase = True ' 设置是否区分大小写。
ReplaceTest = regEx.Replace(str1, replStr) ' 作替换。
End Function
Function Offimg(str1) '去内容中IMG标签,与任意正则函数搭配使用
img="<img[^>]*>"
IMG="<IMG[^>]*>"
Offimg=ReplaceTest(IMG,"",(ReplaceTest(img,"",str1)))
End Function