//提取字符串中至少连续7位的数字 string txt = "www17736123780eeeee 7377091 ddddsssss7777777"; //找到的成功匹配的集合 MatchCollection mc = Regex.Matches(txt, @"\d{7,}"); foreach (Match m in mc) { Console.WriteLine(m.Value); }
来源:中国建筑市场网