验证邮箱地址是否正确的方法

         /// <summary>
         /// 验证邮件格式
         /// </summary>
         /// <param name="email">邮件地址</param>
         /// <returns>是否匹配</returns>
        public bool Checkemail(String email)
        {
            String strExp = @"\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*";
            Regex r = new Regex(strExp);
            Match m = r.Match(email);
            if (m.Success)
            {
                return true;
            }
            else { return false; }
        }

  

原文地址:https://www.cnblogs.com/maijin/p/2790976.html