I have the following to replace uppercase HTML tags with lowercase ones.
$output = preg_replace("%<(/?[A-Z].*?)>%s",strtolower('$1'),$output);
The matching seems to be working well (in my RegEx testing site), but the replacement isn't.
<EM>TEST</EM> becomes EMTEST/EM
Hoping someone can point me in the right direction on this.