Replaced preg_replace() with preg_replace_callback()

The /e modifier is deprecated in PHP 5. According to PHP docs preg_replace_callback() works with PHP 4 >= 4.0.5, PHP 5