Don't user eregi (or any other POSIX function) unless you really have to. The preg_match() (PCRE functions) are faster and binary-safe, to sum up the PCRE functions are better than the POSIX functions.
Your regexp is unfortunatly incomplete (doesn't match all possible addresses) but hey, there is as far as I'm concered only one which does (were situated here before it got removec; http://public.yahoo.com/~jfriedl/regex/email-unopt.pl) but yours matches a bit to few for my taste. It won't match addresses such as james+blunt@example.com or james&blunt@example.com (they are both valid addresses).
Just some thoughts.
----------------------- http://jiart.org/ My digital playground with it's own sandbox. Well anyway, I love programming
Your regexp is unfortunatly incomplete (doesn't match all possible addresses) but hey, there is as far as I'm concered only one which does (were situated here before it got removec; http://public.yahoo.com/~jfriedl/regex/email-unopt.pl) but yours matches a bit to few for my taste.
It won't match addresses such as james+blunt@example.com or james&blunt@example.com (they are both valid addresses).
Just some thoughts.
-----------------------
http://jiart.org/
My digital playground with it's own sandbox.
Well anyway, I love programming
-----------------------
Proud owner of scriptsentials.com and the Scriptsentials network.
It's really handy, yet so often forgotten.