http://www.regexplib.com
里面非常全的

解决方案 »

  1.   

    @"^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$"这个不包括以IP为域名的邮件地址
      

  2.   

    這都是ASP.NET裏自帶的,有什麽問的
      

  3.   

    \w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*
      

  4.   

    <script language="c#" runat=server>
    protected void Page_Load(Object Src, EventArgs E){
    if(judgeMail("[email protected]"))
    showmsg.Text="合法地址";
    }
    bool judgeMail(String strMail){
    //Regex r=new Regex("^[a-zA-Z]\\w{3,15}$"); //这个是 判断密码的问题
    Regex r=new Regex("^([a-z0-9_]|\\-|\\.)+@(([a-z0-9_]|\\-)+\\.)+[a-z]{2,4}$"); //这个是判断是否是 合法的 mail地址
    return r.IsMatch(strMail);
    }
    </script><Asp:Label id=showmsg runat=server Text="非法地址" /> 
      

  5.   

    在RegularExpressionValidator中就有這個表達式(E_Mail驗證):
    \w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*