Changed deprecated preg_replace pattern modifier usage.