I want to strip all attributes (and their values) within an HTML string using C# and RegEx.
For example:
<p>This is a text</p><span class="cls" style="background-color: yellow">This is another text</span>
would become
<p>This is a text</p><span>This is another text</span>
Also, I need to remove all attributes whether or not their values are surrounded by quotes.
i.e.
<p class="cls">Some content</p>
<p class='cls'>Some content</p>
<p class=cls>Some content</p>
should all result in
<p>Some content</p>
I cannot use HTMLAgilityPack due to security reasons, so i need to do this using RegEx.