C#正则表达式操作中使用LINQ

比如:[程序员][代码]博客园 - 程序员的网上家园,代码改变世界

提取出来的Tag应该是:[程序员]、[代码]

Regex _regexTag = new Regex(@"^([[^]]+])+", RegexOptions.Compiled);
return _regexTag.Match(ingContent).Groups[1].Captures.Cast<Capture>().Select(c => c.Value).ToList();
原文地址:https://www.cnblogs.com/sjqq/p/8529724.html