$subject = "my email is spark@imooc.com"; //在这里补充代码,实现正则匹配,并输出邮箱地址 $pattern = '/[a-zA-Z0-9_\-\.]+@+[a-zA-Z0-9_\-\.]+\.[a-zA-Z0-9_\-\.]+$/'; preg_match($pattern,$subject,$match); echo $match[0];
简单的邮件地址验证格式
$subject = "my email is spark@imooc.com"; //在这里补充代码,实现正则匹配,并输出邮箱地址 $pattern = '/[a-zA-Z0-9_\-\.]+@+[a-zA-Z0-9_\-\.]+\.[a-zA-Z0-9_\-\.]+$/'; preg_match($pattern,$subject,$match); echo $match[0];
简单的邮件地址验证格式
2014-10-14
举报