Small optimization

Replaced preg_replace with faster strtr