fork(1) 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 text = "Tom told Jerry, \"You there!\nCome here.\" \nThen Jerry responded, \"Not today.\"";
  12. var pattern = "(?:\"[^\"]*\"|[^\n\"])+";
  13. var result = Regex.Matches(text, pattern);
  14. foreach (Match m in result)
  15. {
  16. Console.WriteLine("'" + m.Value + "'");
  17. }
  18. }
  19. }
Success #stdin #stdout 0.07s 27144KB
stdin
Standard input is empty
stdout
'Tom told Jerry, "You there!
Come here." '
'Then Jerry responded, "Not today."'