Easy reg expression problem

From: Date: Thu, 15 Jul 2004 23:43:46 +0000
Subject: Easy reg expression problem
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.db 
Request: Send a blank email to php-db+get-35294@lists.php.net to get a copy of this message
I am trying to work out how to isolate the bit after and including the @ in an email address using php. I would be grateful if someone could point me to the expression. $email="me@email.com"; ereg("([a-zA-Z0-9])@([a-zA-Z0-9]).([a-zA-Z0-9]))", $email, $regs); print("@".$regs[1].$regs[2].$regs[3]); prints @ What am I doing/need to do? Thanks, John

« previous php.db (#35294) next »