正则表达式之Regex.Matches()用法

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

 

来源:中国建筑市场网

posted @ 2016-04-01 09:38  苦逼的猿人  阅读(10017)  评论(0编辑  收藏  举报