Fixes #2241 Replacing preg_replace e modifier PHP 5.5