Re: How to remove tag



Hi,
How can I Use RegEx to remove the HTML tags for a string?


"Andy Bates" <andy@xxxxxxxxxx> ¼¶¼g©ó¶l¥ó·s»D:O5pTuxozGHA.4920@xxxxxxxxxxxxxxxxxxxxxxx
Unless it is XHTML you'll have to load it into a string and parse it for
the tags; you could proably write a RegEx to look for the HTML tags that
you want to remove.

If it is XHTML then you can load it into a DOM (XmlDocument) and parse the
nodes amending the structure as required.

HTH

- Andy

"ad" <flying@xxxxxxxxxxxxxxx> wrote in message
news:OWxIRrnzGHA.1252@xxxxxxxxxxxxxxxxxxxxxxx
I have a string , it is make up of html tag and some text, like:
<font color=red>Town </font></strong> <strong>...
How can I remove the html tag form this string with C#





.



Relevant Pages

  • Re: Removing html tags from field
    ... You didn't happen to name the module KillHTML, ... >> Public Function KillHTML(sText As String, ... Dim iRight As Integer ... >>> Is there a way to remove html tags from a memo field? ...
    (microsoft.public.access.queries)
  • Re: Table in MySql database
    ... >can add html tags and so on and all works fine. ... the function that does the translation does not know you are ... Now if you remove the nl2br() function then it will prevent it happening ... Note that this assumes that the string '<table' will only occur when you ...
    (alt.php)
  • Re: Replacing html tags
    ... I'm not all that bad at Regex, but i'm stumped on how to approach my ... I need to parse a string and remove all html tags except hyperlinks. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: extract text from html
    ... if you mean your Goal is just simply removing the HTML tags from a string ... i made a function for this purpose with some Regex ... Private Function stripHTMLAs String ... > Note, this is a Windows App, and not a Web App. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: extract text from html
    ... > if you mean your Goal is just simply removing the HTML tags from a string ... > Private Function stripHTMLAs String ... >> Note, this is a Windows App, and not a Web App. ...
    (microsoft.public.dotnet.languages.vb)