replace 'eregi', use 'preg_match', because 'eregi'/'ereg' are deprecated as of PHP5.3