ASP实现清除HTML标签,清除 空格等编码asp

/ / 2019-06-20   阅读:2558
'清除HTML格式 Function RemoveHTML(strText) Dim RegEx Set RegEx = New RegExp RegEx.Global = True '清除HTML标签 RegEx.Pattern = "<[^>]*>" RemoveHTML = regEx.Replace(strText, "")  '...
'清除HTML格式
Function RemoveHTML(strText)
Dim RegEx
Set RegEx = New RegExp
RegEx.Global = True
'清除HTML标签
RegEx.Pattern = "<[^>]*>"
RemoveHTML = regEx.Replace(strText, "") 
'清除空格等&****;格式的编码
regEx.Pattern = "&.\w+;"
RemoveHTML = regEx.Replace(RemoveHTML, "") 
End Function

我要评论

昵称:
验证码:

最新评论

共0条 共0页 10条/页 首页 上一页 下一页 尾页
意见反馈