111,126
社区成员
发帖
与我相关
我的任务
分享List<string> list = new List<string>();
MatchCollection mc = Regex.Matches(yourStr, @"\$([^$]+)\$");
foreach (Match m in mc)
{
list.Add(m.Groups[1].Value);
}
foreach (string s in list)
{
richTextBox2.Text += s + "\n";
}