Home  >  Article  >  Backend Development  >  PHP 不要正则验证邮件 大神何在

PHP 不要正则验证邮件 大神何在

WBOY
WBOYOriginal
2016-06-13 12:15:491051browse

PHP 不用正则验证邮件 大神何在
条件1:第一个字符必须是英文或数字或下划线 用哪个字符串函数?
条件2:必须包含一个@ 字符串函数是?
条件3:包含一个以上 . 符
条件4:@符在.符前
条件5:[email protected]
条件6:长度不能长于30 这个知道 用mb_strlen
------解决思路----------------------

引用:
很想了解下,这样的应用场景,还有什么比正则更加合适呢?


逐字符分析其实很简单,正则表达式看似简洁但是效率很低
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn