fork download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. var str = "a \\\"b\\\" c";
  9. Console.WriteLine(str);
  10. var rx = new Regex(@"(?:\\""|[^""])+");
  11. Console.WriteLine(rx.Match(str).Value);
  12. }
  13. }
Success #stdin #stdout 0.07s 24608KB
stdin
Standard input is empty
stdout
a \"b\" c
a \"b\" c