Hi guys,
Sure this is probobly simple but my head just can't get around this issues... I'm trying to parse the HTML to start replacing/removing problem tags to meet W3C AA compliance and various other requirements. The first one i'm working on is removing the 'bgcolor' attribute of any table/tr/td tag. But using the hexadecimal value already existing in a new style.
For instance:
<tr bgcolor="#A3A3A3" alt="something" >
I'm trying to capture the #A3A3A3 and replace the bgcolor="#A3A3A3" with style='background:#A3A3A34'
Or:
<table
bgcolor="#000000"><tr><td>text</td></tr></table>
Gets changed to:
<table style='background:
#000000"><tr><td>text</td></tr></table>
This regular expression needs to allow for spaces after the bgcolor attribute, and those without. I've searched for somthing similar, but whenever modifying it i ruin it somehow.
Any ideas or pointers would be greatly appreciated...
If you need any further info please don't hesitate to ask. Right now i'm just trying to develop the expression, and this will be applied in a VB.NET 2005 (2.0) application i'm developing..
Best regards,
Tom