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

验证邮箱的正则表达式

WBOY
Release: 2016-06-23 13:35:26
Original
1254 people have browsed it

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

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

QQ邮箱推出VIP邮箱域名了,会员独享VIP邮箱注册及使用权!同一QQ号码注册的@vip.qq.com与@qq.com两个域名指向同一邮箱,一样的写信,一样的收信,唯独彰显您的尊贵身份与特权。
Copy after login


特权邮箱颠覆我之前的邮箱规则,那么邮箱的规则是什么?


回复讨论(解决方案)

/^[\w\-\.]+@[\w\-\.]+(\.\w+)+$/

邮箱的规则是什么?

最少 6 位,最多 32 位,@ 后面可以有多个 . ,比如你说的 @ vip.qq.com,一般这就是邮箱的规则,其它特殊且存在的邮箱再做相应的修改(应该很少)

用HTML5,直接可验证多方便

用HTML5,直接可验证多方便


不懂?
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