Re: Stripping HTML Tags from a Text File
- Posted by vmars May 30, 2009
- 1389 views
I searched google for [remove html tags] and [strip html] and [remove html script]
and there are lots of things out there. The most popular seem to be javascript and C+ .
Probably, you could make an include out of this:
Using webcontent in applications can be very annoying since webcontent usually contains lots of HTML elements. With one simple action, using regular expressions, all of these HTML elements can be removed from the content. What's left is a clean string, without HTML formatting. Snippet: using System.Text.RegularExpressions; ...
public static string RemoveHTML(string in_HTML) { return Regex.Replace(lv_HTML, "<(.|\n)*?>", ""); }
Labels: HTML, Regular Expression
Posted by Xander Zelders on http://www.dotnet4all.com/snippets/2007/04/how-to-remove-html-tags-from-web.html
If you do, could you please Post it here. Thanks! ...Vern