hisuwh Posted August 18, 2010 Share Posted August 18, 2010 I have this regular expression which worked with eregi, which is now deprecated but i dont know how to get it to work with preg_match.Help would be much appreciated.Cheers ^[a-zA-Z0-9._-]+@[a-zA-Z0-9-]+\.[a-zA-Z.]{2,5}$ Link to comment Share on other sites More sharing options...
chibineku Posted August 18, 2010 Share Posted August 18, 2010 $needle = "/^[a-zA-Z0-9._-]+@[a-zA-Z0-9-]+\.[a-zA-Z.]{2,5}$/";if(preg_match($needle, $haystack)) {//whatever} Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.