Home > Backend Development > PHP Tutorial > 验证邮箱的正则表达式解决办法

验证邮箱的正则表达式解决办法

WBOY
Release: 2016-06-13 12:19:10
Original
1173 people have browsed it

验证邮箱的正则表达式
谁能发个邮箱正则表达式参考下.
我理解的邮箱规则  [email protected]    
 
/^[\w-]+@[\w-]+\.[\w-]+$/  (这个行得通吗?)

现在有些特权邮箱,需要考虑进去吗?

<br />QQ邮箱推出VIP邮箱域名了,会员独享VIP邮箱注册及使用权![email&#160;protected]@qq.com两个域名指向同一邮箱,一样的写信,一样的收信,唯独彰显您的尊贵身份与特权。<br />
Copy after login


特权邮箱颠覆我之前的邮箱规则,那么邮箱的规则是什么?
------解决思路----------------------
/^[\w\-\.]+@[\w\-\.]+(\.\w+)+$/
------解决思路----------------------
最少 6 位,最多 32 位,@ 后面可以有多个 . ,比如你说的 @ vip.qq.com,一般这就是邮箱的规则,其它特殊且存在的邮箱再做相应的修改(应该很少)

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template