change form eregi() to preg_match()