正则表达式之Regex.Matches()用法时间:2023-03-10 08:42:25 //提取字符串中至少连续7位的数字 string txt = "www17736123780eeeee 7377091 ddddsssss7777777"; //找到的成功匹配的集合 MatchCollection mc = Regex.Matches(txt, @"\d{7,}"); foreach (Match m in mc) { Console.WriteLine(m.Value); }