Extract email address from string

From: Date: Sun, 19 Aug 2001 02:37:20 +0000
Subject: Extract email address from string
Groups: php.general 
Request: Send a blank email to php-general+get-63314@lists.php.net to get a copy of this message
I need to parse a string and extract only the email address. What is the best way to do this? i.e. $string = "Please send all email to someone@somewhere.com with a subject line of Test."; $email_addr would be equal to someone@somewhere.com . Thanks.

« previous php.general (#63314) next »