62,046
社区成员
发帖
与我相关
我的任务
分享
string str = File.ReadAllText(@"E:\1.txt");
Regex reg = new Regex(".{20}");
List<string> list = new List<string>();
foreach (Match m in reg.Matches(str))
list.Add(m.Value);
list.ForEach(y => Console.WriteLine(y));
Console.WriteLine();
list.Where(x => x.Contains("333")).ToList().ForEach(y => Console.WriteLine(y));
Regex reg = new Regex("\\w{20}");
string s = "";
MatchCollection mcs = reg.Matches(s);