net验证邮件地址的合法性
/// <summary> /// 检测邮件地址是否合法 /// </summary> /// <param name="mails">被检测的字符串</param> /// <returns></returns> public static bool CheckMail(string mails) { bool istrue = false; Regex re = new Regex("\\w+@(\\w+.)+[a-z]{2,3}"); if (re.IsMatch(mails)) { istrue = true; } return istrue; }