fixed deprecated preg_replace