fork(6) download
  1. using System;
  2. using System.Linq;
  3. using System.Text.RegularExpressions;
  4.  
  5. public class Test
  6. {
  7. public static void Main()
  8. {
  9. string s = "abcdefgh";
  10. foreach (var part in Regex.Matches(s, ".{2}").Cast<Match>())
  11. Console.WriteLine(part.Value);
  12. }
  13. }
Success #stdin #stdout 0.06s 37240KB
stdin
Standard input is empty
stdout
ab
cd
ef
gh