fork(2) download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. const string line = @"125,45.124.890,45,32,67.456";
  9. MatchCollection matches = Regex.Matches(line,
  10. @"(?!0\d)\d{1,3}(?:\.\d{3})*(?:\,\d+(?![\d\.]))?");
  11. foreach(Match match in matches)
  12. {
  13. foreach (Capture capture in match.Captures)
  14. {
  15. Console.WriteLine(capture.Value);
  16. }
  17. }
  18. }
  19. }
Success #stdin #stdout 0.07s 37256KB
stdin
Standard input is empty
stdout
125
45.124.890,45
32
67.456