本篇文章主要介绍PHP正则表达式库实现邮件地址验证,感兴趣的朋友参考下,希望对大家有所帮助。
代码如下:
\n"; $user_name = preg_replace( $pattern ,"$1", $email_address ); $domain_name = preg_replace( $pattern ,"$2", $email_address ); $reply .= "用户名:".$user_name."
\n"; $reply .= "域名:".$domain_name."
\n\n"; } else { $reply = "您输入的电子邮件地址不合法"; } } ?>电子邮件地址验证程序 电子邮件地址验证程序
总结:以上就是本篇文的全部内容,希望能对大家的学习有所帮助。
相关推荐:
The above is the detailed content of PHP regular expression library implements email address verification. For more information, please follow other related articles on the PHP Chinese website!