NYCPHP Meetup

NYPHP.org

[nycphp-talk] Preg_match email address

Jeff jsiegel1 at optonline.net
Mon Sep 15 11:56:55 EDT 2003


It's a heck of a lot more intelligible than what I concocted...I'll give
it a shot.

Jeff

-----Original Message-----
From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]
On Behalf Of Cogswell, Eric
Sent: Monday, September 15, 2003 10:11 AM
To: NYPHP Talk
Subject: RE: [nycphp-talk] Preg_match email address


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
_______________________________________________
talk mailing list
talk at lists.nyphp.org
http://lists.nyphp.org/mailman/listinfo/talk




More information about the talk mailing list