use SinglelineRegex reg=new Regex("begin(.*)end", RegexOptions.Singleline);
Match m = reg.Match(str);
string str2;
if (m.Success)
str2= m.Groups[1].Value;
Match m = reg.Match(str);
string str2;
if (m.Success)
str2= m.Groups[1].Value;
真的谢谢你啊!