Friday, 9 August 2013

How do I remove all HTML tags from a string without knowing which tags are in it?

How do I remove all HTML tags from a string without knowing which tags are
in it?

Is there any easy way to remove all HTML tags or ANYTHING HTML related
from a string?
For example:
string title = "<b> Hulk Hogan's Celebrity Championship Wrestling
&nbsp;&nbsp;&nbsp;<font color=\"#228b22\">[Proj #
206010]</font></b>&nbsp;&nbsp;&nbsp; (Reality Series, &nbsp;)"
The above should really be:
"Hulk Hogan's Celebrity Championship Wrestling [Proj # 206010] (Reality
Series)"

No comments:

Post a Comment