...
|
...
|
@@ -77,6 +77,14 @@ class Address { |
|
|
* @time 2024/9/11 11:43
|
|
|
*/
|
|
|
private function pregEmail(string $str):string {
|
|
|
$str = trim($str);
|
|
|
if(substr($str,-1) == '>'){
|
|
|
$email = substr($str,strrpos($str,'<'));
|
|
|
if($email){
|
|
|
return trim(str_replace(['<','>'],'',$email));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
preg_match_all('/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/',$str,$email);
|
|
|
if(!empty($email[0])){
|
|
|
$email = end($email[0]);
|
...
|
...
|
|