$HTML = < Foo This regex is broken It will cope with this But not this< /b> told youtsroken THIS $HTML =~ s/<(?!\/*[bi]>).*?>/x/g; print $HTML;