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 = "12\"The world... 13The end 14\"I have 16 years 15Kiss me";
  12. Console.WriteLine(Regex.Replace(text, @"\s+(?=\d+[^\s\d])", "\n"));
  13. }
  14. }
Success #stdin #stdout 0.05s 21176KB
stdin
Standard input is empty
stdout
12"The world...
13The end
14"I have 16 years
15Kiss me