Get text from HTML

Public Function StripTags(ByVal HTML As String) As String
' Removes tags from passed HTML
Dim objRegEx As _
System.Text.RegularExpressions.Regex
Return objRegEx.Replace(HTML, "<[^>]*>", "")
End Function

protected string GetTextFromHTML(string HTML)
{
// Removes tags from passed HTML
return System.Text.RegularExpressions.Regex.Replace(HTML, "<[^>]*>", "");
}

你可能感兴趣的:(html)