开发者

Underscore not accepting in xml schema for email address

Hi I have created a schema and the following pattern to check for email id:

\w+([-+._]\w+)*@\w+([-.]\w+开发者_Python百科)*\.\w+([-.]\w+)*.

However it is not accepting email id's containing underscore like bob_t@example.com. Can you please modify this pattern so that it accepts _ too.

Thanks


Something like the following should work (I removed some other apparent errors or idiosyncrasies):

\w[-+._\w]+@\w[-.\w]+\.\w[-.\w]+

however, be aware that whatever pattern you choose, you'll always exclude some valid email-addresses (the email address standard is very wide) while at the same time you may be including some invalid ones.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜