Hi all,
I'm writing a filter that uses regular expressions to detect non-XHTML-compliant output in my .NET 1.1 applications. I don't have much experience of regular expressions so I'm a bit stuck. I've found advice elsewhere on the web to do some things such as removing the name attribute of the form tag and updating the postback javascript to use DOM. What I'm looking for though are regular expressions that can do the following when applied to a string:
- close any unclosed empty tags (e.g. <br> to <br />)
- replace any uppercase HTML tags and attributes with lowercase equivalent.
Once done I'm happy to publish the finished code so that all of us 1.1ers can go XHTML!
Thanks in advance.
I'm writing a filter that uses regular expressions to detect non-XHTML-compliant output in my .NET 1.1 applications. I don't have much experience of regular expressions so I'm a bit stuck. I've found advice elsewhere on the web to do some things such as removing the name attribute of the form tag and updating the postback javascript to use DOM. What I'm looking for though are regular expressions that can do the following when applied to a string:
- close any unclosed empty tags (e.g. <br> to <br />)
- replace any uppercase HTML tags and attributes with lowercase equivalent.
Once done I'm happy to publish the finished code so that all of us 1.1ers can go XHTML!
Thanks in advance.