Re: Stripping HTML Tags from a Text File

new topic     » goto parent     » topic index » view thread      » older message » newer message

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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu