Is Chinese Phone Number - CSharp System.Globalization

CSharp examples for System.Globalization:Chinese

Description

Is Chinese Phone Number

Demo Code


using System.Text.RegularExpressions;
using System.Text;
using System.Reflection;
using System.Linq;
using System.Collections.Generic;
using System;/*from  w  w w.ja  va 2  s .c om*/

public class Main{
        public static bool IsChinesePhoneNumber(string input)
        {
            return Regex.IsMatch(input, @"^[0-9\-]{0,20}$");
        }
}

Related Tutorials