using System;
using System.Linq;
using System.Collections.Generic;
using System.Text.RegularExpressions;
public class Test
{
public static void Main()
{
var s = "\"first \\\"value\\\\\\\\\", \"second, value\", \"third value\"";
Console.WriteLine(s);
var results = Regex.Matches(s, @"(?<!\\)(?:\\{2})*""([^\\""]*(?:\\.[^""\\]*)*)""")
.Cast<Match>()
.Select(x => x.Groups[1].Value);
Console.WriteLine($"'{string.Join("', '", results)}'");
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uTGlucTsKdXNpbmcgU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWM7CnVzaW5nIFN5c3RlbS5UZXh0LlJlZ3VsYXJFeHByZXNzaW9uczsKcHVibGljIGNsYXNzIFRlc3QKewoJcHVibGljIHN0YXRpYyB2b2lkIE1haW4oKQoJewoJCXZhciBzID0gIlwiZmlyc3QgXFxcInZhbHVlXFxcXFxcXFxcIiwgXCJzZWNvbmQsIHZhbHVlXCIsIFwidGhpcmQgdmFsdWVcIiI7CgkJQ29uc29sZS5Xcml0ZUxpbmUocyk7CgkJdmFyIHJlc3VsdHMgPSBSZWdleC5NYXRjaGVzKHMsIEAiKD88IVxcKSg/OlxcezJ9KSoiIihbXlxcIiJdKig/OlxcLlteIiJcXF0qKSopIiIiKQoJCSAJCS5DYXN0PE1hdGNoPigpCgkJIAkJLlNlbGVjdCh4ID0+IHguR3JvdXBzWzFdLlZhbHVlKTsKCQlDb25zb2xlLldyaXRlTGluZSgkIid7c3RyaW5nLkpvaW4oIicsICciLCByZXN1bHRzKX0nIik7CgkJIAoJCSAKCX0KfQ==