复制代码 代码如下:
function cleanword(html)
dim regex
set regex=new regexp
regex.ignorecase=true
regex.global=true
regex.pattern="<[^>]*>" '清除所有<>之间的内容
html = regex.replace(html,"" )
regex.pattern="{[^}]*}" '清除所有{}之间的内容
html = regex.replace(html,"" )
regex.pattern="/[^/]*/" '清除所有/**/之间的注释
html = regex.replace(html,"" )
html =replace(html,"table.msonormaltable","") '替换掉漏网的单词
cleanword= html
set regex=nothing
end function
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:)!