help making a better email check
Posted: Sat Jan 17, 2004 9:15 pm
current: preg_match('/^[\w\.\-]+@[\w\.\-]+\.\w\w\w?$/', $email)
a friend typoed nrt for net. so i figure even with two feilds ineed a better check. i want to allow the two letter country codes and all the 3/4 letter domains (i don't see anyone using museum)
does anyone know a place that has an up to date list? will the others with prel reg exp skim this quickly and make sure i didn't screw up (i find that i have a tendency to make minor mistakes, if i did it should be caught by one of you i expect... don't have a way to test this until i can get a friend to try it, which might be after you look at it)
new: preg_match('/^[\w\.\-]+@[\w\.\-]+\.(\w\w|biz|com|org|gov|net|info)$/', $email)
a friend typoed nrt for net. so i figure even with two feilds ineed a better check. i want to allow the two letter country codes and all the 3/4 letter domains (i don't see anyone using museum)
does anyone know a place that has an up to date list? will the others with prel reg exp skim this quickly and make sure i didn't screw up (i find that i have a tendency to make minor mistakes, if i did it should be caught by one of you i expect... don't have a way to test this until i can get a friend to try it, which might be after you look at it)
new: preg_match('/^[\w\.\-]+@[\w\.\-]+\.(\w\w|biz|com|org|gov|net|info)$/', $email)