日期:2014-05-17 浏览次数:20927 次
System.IO.StreamReader reader = new System.IO.StreamReader(@"e:\1.txt",Encoding.Default);
string source = reader.ReadToEnd();
string patten = @"(?<=叫
------解决方案--------------------
是
------解决方案--------------------
用)[^,.]+(?=,
------解决方案--------------------
\.)";
Regex reg = new Regex(patten);
MatchCollection mc = reg.Matches(source);
foreach (Match item in mc)
{
MessageBox.Show(item.Value);
}