110,536
社区成员
发帖
与我相关
我的任务
分享
(?s)\[1\]((?!\[[12]\]).)*\[2\]((?!\[[14]\]).)*\[4\]
Match m = Regex.Match(yourStr, @"\[1\]((?!\[\[34]\])[\s\S])*\[2\]((?!\[\[4]\])[\s\S])*\[4\]");
if (m.Success)
richTextBox2.Text = m.Value;
else
richTextBox2.Text = "没找个符合条件的内容";