using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text.RegularExpressions; public class Test { public static void Main() { var test = "and ( [family]: \" trees \" or [family]: \" colors \" )"; var result = Regex.Matches(test, @"\[family]:\s*""([^""]*)""") .Cast() .Select(m => m.Groups[1].Value.Trim()) .ToList(); foreach (var s in result) Console.WriteLine(s); } }