Change preg_replace to preg_replace_callback

As of PHP 5.5, the preg e modifier is deprecated and throw errors.
Merge pull request #1 from jankr/patch-1

Change preg_replace to preg_replace_callback