php-5.5 compatibility

`preg_replace_callback` instead of `preg_replace` for php-5.5 and symfony 1.5 compatibility