Improves compatibility with ionize 1.0.6

Function ereg_replace() is deprecated. Replaced by preg_replace();