I already searched a long time but I didnt find an answer. I hope you can help me. So I want to remove one duplicate HTML tag for example:
I have a text like this: <BIG><BIG><BIG>Text</BIG></BIG></BIG>
and if I press a button it should be something like this: <BIG><BIG>Text</BIG></BIG>
I already tried RegExbut it will delete all HTML Tags. I also found the HTML Agility Pack but I dont know how to do it.
The RegEx I tried:
public static string RemoveHTML(string source)
{
return Regex.Replace(source, "<.*?>", string.Empty);
}