What regular expression would strip out all attributes from a BR tag?

Posted by Edward Tanguay on Stack Overflow See other posts from Stack Overflow or by Edward Tanguay
Published on 2010-03-22T15:13:33Z Indexed on 2010/03/22 15:21 UTC
Read the original article Hit count: 284

Filed under:
|

What C# regular expression would replace all of these:

<BR style=color:#93c47d>
<BR style=color:#fefefe>
<BR style="color:#93c47d">
<BR style="color:#93c47d ...">
<BR>
<BR/>
<br style=color:#93c47d>
<br style=color:#fefefe>
<br style="color:#93c47d">
<br style="color:#93c47d ...">
<br>
<br/>

with:

<br/>

basically "remove all attributes from any BR element and lowercase it".

© Stack Overflow or respective owner

Related posts about c#

Related posts about regex