Hi,
I've been trying to formulate a regular expression to remove any attributes that may be present in html tags but I'm having trouble doing this and Google doesn't seem to provide any answers either.
Basically my input string looks something like
<p style="font-family:Arial;" class="x" onclick="doWhatever();">this text</p>
<img style="border:0px" src="pic.gif" />
and I would like to remove any attributes inside the tag to produce a string like:
<p>this text</p>
<img src="pic.gif" />
Does anybody know a regex for doing this? I'm using Regex.Replace in C# by the way.
Thanks,
Tim