62,267
社区成员
发帖
与我相关
我的任务
分享MatchCollection mc = Regex.Matches(yourStr, @"\[([^\]]+)\]((?:(?!\[\1)[\s\S])*)\[\1!\]", RegexOptions.IgnoreCase);
foreach (Match m in mc)
{
richTextBox2.Text += m.Groups[1].Value + "=" + m.Groups[2].Value + ";\n";
}
//输出
id=5554323;
destid=10657302023180404;
srcterminalid=13518841197;
msgcontent=好的;
receivetime=20090409165217;