replaced deprecated php function call ereg_replace with preg_replace.