fork download
  1. using System;
  2. using System.IO;
  3. using System.Text.RegularExpressions;
  4.  
  5. public class Test
  6. {
  7. public static void Main()
  8. {
  9. var s = "1\r\n2\r3\n4";
  10. var res = Regex.Matches(s, @"(?m)^\d+");
  11. foreach (Match m in res)
  12. Console.WriteLine(m.Value);
  13.  
  14. }
  15. }
Success #stdin #stdout 0.03s 30080KB
stdin
Standard input is empty
stdout
1
2
4