I use this regex for validation:
^[\w-\.|!|#|$|%|&|'|*|+|/|=|?|^]+@([\w-]+\.)+[\w-]{2,10}$
(From C#)
See
Wiki[
^] for more info on valid email address.
PHP code
$sourcestring="your source string";
preg_match('/^[\w-\.|!|#|$|%|\&|\'|*|+|\/|=|?|^]+@([\w-]+\.)+[\w-]{2,10}$/',$sourcestring,$matches);
echo print_r($matches,true);