NYCPHP Meetup

NYPHP.org

[nycphp-talk] Preg_match email address

Cogswell, Eric eric.cogswell at innlink.com
Mon Sep 15 11:11:29 EDT 2003


Try this:

	^([[:alnum:]]|_|\.|-)+@([[:alnum:]]|\.|-)+(\.)([a-z]{2,4})$

It seems to work for me.


-Eric



-----Original Message-----
From: Jeff [mailto:jsiegel1 at optonline.net]
Sent: Monday, September 15, 2003 9:56 AM
To: 'NYPHP Talk'
Subject: [nycphp-talk] Preg_match email address


I'm hoping those who are more adept at regular expressions could tell me
if this will validate the majority of email addresses...it seems like it
will but...

'/^[ a-z0-9-_]+(.[
a-z0-9-_]+)*@[a-z0-9-]+(.[a-z0-9-_]+)*(.[a-z]{2,3})$/i',

Thanks,

Jeff Siegel

_______________________________________________
talk mailing list
talk at lists.nyphp.org
http://lists.nyphp.org/mailman/listinfo/talk



More information about the talk mailing list