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

  • Post author:
  • Post category:其他


'清除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

转载于:https://www.cnblogs.com/uuxanet/p/3282756.html