C#验证邮件

public static bool IsEmail(string email)
{
    String strExp = @"\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*";
    Regex r = new Regex(strExp);
    Match m = r.Match(email);
    return m.Success;
}

  

posted @ 2014-08-16 10:01  跟着阿笨一起玩.NET  阅读(271)  评论(0编辑  收藏  举报