Fix preg_replace deprecation warning