html转换成文本

    Public Shared Function RemoveHtml(ByVal strHTML) As String
        
Dim Pattern = "<(\/\s*)?!?((\w+:)?\w+)(\w+(\s*=?\s*(([""'])(\\[""'tbnr]|[^\7])*?\7|\w+)|.{0})|\s)*?(\/\s*)?>"
        strHTML 
= System.Text.RegularExpressions.Regex.Replace(strHTML, Pattern, String.Empty, System.Text.RegularExpressions.RegexOptions.IgnoreCase)
        strHTML 
= strHTML.Replace("&nbsp;""")
        
Return strHTML
    
End Function
原文地址:https://www.cnblogs.com/always/p/405661.html