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 text = @"select 1 from dual;
  12. select 2 from dual;
  13. select 3 from dual;";
  14. var output = Regex.Split( text.TrimEnd(new[] {';'}), @";\s*\n" );
  15. foreach (var s in output)
  16. Console.WriteLine(s);
  17. }
  18. }
Success #stdin #stdout 0.07s 29400KB
stdin
Standard input is empty
stdout
select 1 from dual
select 2 from dual
select 3 from dual