How to handle long email address with regex?
This question already has an answer here:
You can use the MailAddress class to validate the email instead of validating it using the regex.
MailAddress m = new MailAddress(email);
From MSDN
Instead of using a regular expression to validate an email address, you can use the System.Net.Mail.MailAddress class. To determine whether an email address is valid, pass the email address to the MailAddress.MailAddress(String) class constructor.
链接地址: http://www.djcxy.com/p/92838.html上一篇: 使电子邮件地址a @ bc未通过验证?
下一篇: 如何使用正则表达式处理长电子邮件地址?