现有字符串: $str = "abcd afe adf ----- a errors -----
<[email protected]>
(some string) ----- other string -----
... [email protected]"包含换行符的,请用正则表达,得到其中的邮件地址:[email protected], 当然这个地址是会变的,在另一个字符串里,可能是[email protected], 不过他前后的字符串都是一样的。
帮忙,谢谢。
<[email protected]>
(some string) ----- other string -----
... [email protected]"包含换行符的,请用正则表达,得到其中的邮件地址:[email protected], 当然这个地址是会变的,在另一个字符串里,可能是[email protected], 不过他前后的字符串都是一样的。
帮忙,谢谢。
<[email protected]>
(some string) ----- other string -----
... [email protected]"preg_match_all('/\w+@\w+\.com/isU',$str,$arr);
print_r($arr);
$pattern = '/.*<(\w+@\w+\.(?:com|cn|net))>/isU'
preg_match($pattern, $str, $match);
$email = $match[1];
echo $email;
?>