fork download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. String input = @"start123start123
  9. start123endstart345end
  10. start567endstart789end";
  11. Regex rgx = new Regex(@"(?<=start)\d+(?=end)");
  12. foreach (Match m in rgx.Matches(input))
  13. Console.WriteLine(m.Value);
  14. }
  15. }
Success #stdin #stdout 0.06s 34872KB
stdin
Standard input is empty
stdout
123
345
567
789