Function To Remove HTML Tags From String In .Net

by wizbay 10. September 2010 02:49

Following function remove all html tags using regular expressions and just return text string.

 

 'Remove HTML tags from string.
    Shared Function RemoveHTML(ByVal str As String) As String
        Return Regex.Replace(str, "<(.|\n)*?>", String.Empty)
    End Function

Tags: , , , , , , ,

ASP.Net | VB.Net

Comments are closed