Regular expression to remove HTML tags in VB.Net
By Anuraj P on April 19th, 2007 . No Comments .
Some time we may need to strip all the HTML tags from HTML files, like if we are doing some web scrapping. Here is simple Regular expression which will remove all the HTML Tags.
Public Sub RemoveHTMLTags(ByVal expression as string) as string Dim pattern As String = "<(.|\n)*?>;" Return System.Text.RegularExpressions.Regex.Replace(strHtmlString, pattern, String.Empty).Trim() End Sub
No Responses to “Regular expression to remove HTML tags in VB.Net”
RSS feed for comments on this post. TrackBack URL