111,120
社区成员
发帖
与我相关
我的任务
分享
string ddd = "这个{%add%},那个{%dde%},这些{%dfed%},那些{%deer%}等等等等";
List<string> list = new List<string>();
foreach (Match match in Regex.Matches(ddd, @"{%[^%]*%}"))
Console.WriteLine(match.Value);
using System.Text.RegularExpressions;
string ddd = "这个{%add%},那个{%dde%},这些{%dfed%},那些{%deer%}等等等等";
List<string> list = new List<string>();
foreach (Match match in Regex.Matches(ddd, @"{%([^%]*)%}"))
list.Add(match.Groups[1].Value);