I'm working on a CMS which makes use of the ContentEditable features available in most browsers nowadays. Unfortunately, the code generated from this is not XHTML compliant. I've managed to iron out most of the kinks using the str_replace function; however, I still have to find a way to make all of the tags lowercase. I'm assuming it should be done with a regular expression replacement (search for strings that start with a < and contain upto a certain amount of letters and numbers afterwards). I'm pretty rubbish at regular expressions, so could someone tell me how to use preg_replace (or any other function you think might work better) to make the tags lowercase.
Thanks in advance!
-Andy
