NYCPHP Meetup

NYPHP.org

[nycphp-talk] Preg_match email address

crisscott at netzero.com crisscott at netzero.com
Mon Sep 15 11:32:47 EDT 2003


>Try this:
>
>	^([[:alnum:]]|_|\.|-)+@([[:alnum:]]|\.|-)+(\.)([a-z]{2,4})$
>
>It seems to work for me.

Correct me if I am wrong but won't ([[:alnum:]]|_|\.|-)+ match things like name.._ at domain.com or . at domain.com?  I don't think this regexp requires letters first and lets you have multiple .'s in a row.

Scott Mattocks



More information about the talk mailing list