手机号

Dim regphone As New Regex("^1[3458]\d{9}$", RegexOptions.IgnoreCase)

标题

        Regex regtitle = new Regex(@"^\s*[a-zA-Z0-9\u4e00-\u9fa5_\s]{2,40}$", RegexOptions.IgnoreCase);

用户名
        Regex regname = new Regex(@"^\s*[a-zA-Z\u4e00-\u9fa5_\s]{2,20}$", RegexOptions.IgnoreCase);

联系方式
        Regex regtel = new Regex(@"[0-9]{3,4}\-?[0-9]{7,8}$", RegexOptions.IgnoreCase);
qq
        Regex regqq = new Regex(@"^[1-9]\d{5,10}$", RegexOptions.IgnoreCase);
email    

    Regex regemail = new Regex(@"\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*", RegexOptions.IgnoreCase);

posted on 2012-09-18 11:55  swarb  阅读(106)  评论(0编辑  收藏  举报