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.
精彩评论