fork(1) download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Linq;
  5. using System.Text.RegularExpressions;
  6.  
  7. public class Test
  8. {
  9. public static void Main()
  10. {
  11. var line = "0.1, 1.1, 2.1, 3.1, 4.1";
  12. var myVals = Regex.Matches(line, @"(?<=\.)\d+", RegexOptions.ECMAScript)
  13. .Cast<Match>()
  14. .Select(m => int.Parse(m.Value))
  15. .ToList();
  16. foreach (var i in myVals)
  17. Console.WriteLine(i);
  18. }
  19. }
Success #stdin #stdout 0.07s 134720KB
stdin
Standard input is empty
stdout
1
1
1
1
1