#region 统计
////分别统计163 qq yahoo gmail等使用情况
//string html = File.ReadAllText("1.htm");
////提取Email
//string str = @"([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9]+)(\.[a-zA-Z0-9]+)+";
//MatchCollection mc = Regex.Matches(html, str);
//int c_163 = 0;
//int c_qq = 0;
//int c_yahoo = 0;
//int c_gmail = 0;
//foreach (Match mac in mc)
//{
// switch (mac.Groups[2].Value.ToLower())
// {
// case "163":
// c_163++;
// break;
// case "qq":
// c_qq++;
// break;
// case "yahoo":
// c_yahoo++;
// break;
// case "gmail":
// c_gmail++;
// break;
// }
//}
//Console.WriteLine("网易用户:{0}", c_163);
//Console.WriteLine("腾讯用户:{0}", c_qq);
//Console.WriteLine("雅虎用户:{0}", c_yahoo);
//Console.WriteLine("gmail用户:{0}", c_gmail);
//Console.ReadKey();
#endregion
Group分组的问题,要是第一个+不包含括号分组的话 Group要用第几组?
|