i have a string with an html code. i want to remove all html tags. so all characters between < and >.
This is my code snipped:
WebClient wClient
According to Ravi's answer, you can use
string noHTML = Regex.Replace(inputHTML, @"<[^>]+>| ", "").Trim();
or
string noHTMLNormalised = Regex.Replace(noHTML, @"\s{2,}", " ");
Try this:
txtSourceCodeFormatted.Text = Regex.Replace(SourceCode, "<.*?>", string.Empty);
But, as others have mentioned, handle with care.