System.Text.RegularExpressions.MatchCollection matchCollection = System.Text.RegularExpressions.Regex.Matches(“[abc adf asdfe]”,@"\[(.*?)]",System.Text.RegularExpressions.RegexOptions.IgnoreCase); foreach (System.Text.RegularExpressions.Match match in matchCollection) { var value = match.Value.Replace(match.Value,""); }原文链接:https://www.f2er.com/regex/362765.html