使用c#2008中的正则表达式validation进行电话号码validation?

我想以这种格式validation电话号码,即+ 919981424199,+ 91231456789,….我正在使用Asp.net + c#2008开发网站。为此我使用了正则表达式validation控件 – >属性 – >validation表达式=“[0-9] +(,[0-9] +)*”。 但这接受号码为919981424199,…..用户可能会以这种方式输入+ 919981424199,919300951916,所以我需要这种类型格式的validation表达式。“+”符号是可选的,可以使用&它不能。我试图解决,但我仍然在寻找。请帮我解决这个问题。 提前致谢。

试试这个: \+?\d+

运行这个:

 var match = Regex.Match(phoneNumberTextBox.Text, @"(?<=^|,)\+?\d+"); while (match.Success) { string phoneNumber = match.Groups[0].Value; Console.WriteLine("Found phone number: " + phoneNumber); match = match.NextMatch(); } 

有了这些数据:

 +919981424199,919300951916 

生成此输出:

 Found phone number: +919981424199 Found phone number: 919300951916