fork(1) download
  1. using System;
  2. using System.Text.RegularExpressions;
  3. using System.Linq;
  4. using System.IO;
  5. public class Test
  6. {
  7. public static void Main()
  8. {
  9. var data = "2345678901";
  10. var res = Regex.Matches(data, @"(?=(\d{4}))")
  11. .Cast<Match>()
  12. .Select(p => p.Groups[1].Value)
  13. .ToList();
  14. Console.WriteLine(string.Join("\n", res));
  15. }
  16. }
Success #stdin #stdout 0.1s 24696KB
stdin
Standard input is empty
stdout
2345
3456
4567
5678
6789
7890
8901