手机号正则表达式

^[1][3-8]+\\d{9}

^首字母
[1]必须是1,方格可以去掉吧。。
[3-8]第二个数字为3-8之间
+加表示至少一个[3-8]
\\d表示数字
{9}表示9个,就是9个数字。

using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
using System.Threading;
 
namespace ConsoleApplication1 {
    class Program {
        public static object _obj = new object();
 
        public static void Main() {
            Regex Regex = new Regex(@"^(86)*0*13\d{9}$");
            Console.WriteLine(Regex.IsMatch("13565264258"));
            Console.WriteLine(Regex.IsMatch("13565264258...."));
            Console.ReadLine();
        }
    }
}

 

 

posted @ 2014-06-01 21:43  daishuguang  阅读(297)  评论(0编辑  收藏  举报