bugfix preg_replace

php5.5 bugfix,  replaced preg_replace with preg_replace_callback