fork download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Linq;
  5. using System.Text.RegularExpressions;
  6.  
  7. public class Test
  8. {
  9. public static void Main()
  10. {
  11. var test = "and ( [family]: \" trees \" or [family]: \" colors \" )";
  12. var result = Regex.Matches(test, @"\[family]:\s*""([^""]*)""")
  13. .Cast<Match>()
  14. .Select(m => m.Groups[1].Value.Trim())
  15. .ToList();
  16. foreach (var s in result)
  17. Console.WriteLine(s);
  18. }
  19. }
Success #stdin #stdout 0.09s 20380KB
stdin
Standard input is empty
stdout
trees
colors