62,046
社区成员
发帖
与我相关
我的任务
分享
using System.Text.RegularExpressions;
string a = "020-12345678,020-12345678 020-1234568,12345678 020-12345678 020-12345678 020-12345678 12345678";
MatchCollection mcollection = Regex.Matches(a, @"\d{3,4}-\d{7,8}|\d{8}");
foreach (Match m in mcollection)
{
Response.Write("m.value=" + m.Value + "<br>");
}