邮件地址的问题

什么样的邮件地址才是有效的?看了Wikipedia的解释着实让人吓了一跳(留存备考):
Valid email addresses
  • niceandsimple@example.com
  • very.common@example.com
  • a.little.lengthy.but.fine@dept.example.com
  • disposable.style.email.with+symbol@example.com
  • user@[IPv6:2001:db8:1ff::a0b:dbd0]
  • "much.more unusual"@example.com
  • "very.unusual.@.unusual.com"@example.com
  • "very.(),:;<>[]\".VERY.\"very@\\ \"very\".unusual"@strange.example.com
  • 0@a
  • postbox@com (top-level domains are valid hostnames)
  • !#$%&'*+-/=?^_`{}|~@example.org
  • "()<>[]:,;@\\\"!#$%&'*+-/=?^_`{}| ~  ? ^_`{}|~.a"@example.org
  • ""@example.org
Invalid email addresses
  • Abc.example.com (an @ character must separate the local and domain parts)
  • Abc.@example.com (character dot(.) is last in local part)
  • Abc..123@example.com (character dot(.) is double)
  • A@b@c@example.com (only one @ is allowed outside quotation marks)
  • a"b(c)d,e:f;g<h>i[j\k]l@example.com (none of the special characters in this local part is allowed outside quotation marks)
  • just"not"right@example.com (quoted strings must be dot separated, or the only element making up the local-part)
  • this is"not\allowed@example.com (spaces, quotes, and backslashes may only exist when within quoted strings and preceded by a backslash)
  • this\ still\"not\\allowed@example.com (even if escaped (preceded by a backslash), spaces, quotes, and backslashes must still be contained by quotes)

转载于:https://www.cnblogs.com/pinocchioatbeijing/archive/2012/11/11/2764933.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值