舞曲下载小河淌水:关于采集中删除iframe的问题

来源:百度文库 编辑:神马品牌网 时间:2024/04/28 12:22:32
Function DelIframe(Str)
If Str = "" Then
DelIframe = ""
Exit Function
End If
Dim regEx
Set regEx=new regExp
regEx.IgnoreCase=true
regEx.Global=true
regEx.pattern = "<iframe.*</iframe>"
' regEx.pattern = "(?i)<iframe([^>])*>(\w|\W)*</iframe([^>])*>"
' regEx.pattern = "<iframe.*</iframe>$"
DelIframe = regEx.replace (Str,"")
Set regEx = Nothing
End Function
只能删除在同行的iframe标签
注释里的代码都试过了 还是不能删除

用REPLACE来删除