can anyone tell me how to match only letters numbers and dots and that it? I tried doing this with ereg ereg("^[a-zA-Z0-9\-]+\.") but can't get it to work. any ideas?
It is preg_match_all And if he just want a false or true return of the function (e.g. in an if statement), he should use eregi
No he shouldn't, The ereg features are being removed from the default PHP installation in PHP 6. You should avoid them in place of the PCRE functions. Dan.