06-11-2009, 10:19 AM
|
#4 (permalink)
|
|
The Contributor
Join Date: Feb 2009
Posts: 64
Thanks: 1
|
dscreck is right - it's quite annoying.
Still you could shorten the whole function somehow like that:
PHP Code:
function extractEmail($string)
{
$regEx = "/([\s]*)[\._a-zA-Z0-9-]+@[\._a-zA-Z0-9-]+/i";
preg_match_all($regEx, $string, $emails);
return $emails;
}
(There might be some errors still - since it's not tested)
|
|
|
|