fork 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. var input = "The Quick Brown Fox Jumps";
  10.  
  11. var regex = new Regex(@"(?<=(?<v>\w+)\s+)(?<v>\w+)");
  12. foreach (var match in regex.Matches(input).Cast<Match>())
  13. {
  14. var value = string.Join(" ", match.Groups["v"].Captures.Cast<Capture>().Select(x => x.Value));
  15.  
  16. Console.WriteLine(value);
  17. }
  18. }
  19. }
Success #stdin #stdout 0.11s 24680KB
stdin
Standard input is empty
stdout
The Quick
Quick Brown
Brown Fox
Fox Jumps