Thursday, 3 September 2015

Remove All html Tag from string in C#


 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;)".Replace("&nbsp;", string.Empty);

  string strfinal = Regex.Replace(title, "<.*?>", String.Empty);
                Console.WriteLine(strfinal );

No comments:

Post a Comment