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 s = "3 45 123\r 456\n 434554645\r\n 000";
  12. var pattern = @"\d+(?![\r\n\d])";
  13. var results = Regex.Matches(s, pattern)
  14. .Cast<Match>()
  15. .Select(m => m.Value);
  16. Console.WriteLine("Result: {0}", string.Join(", ", results));
  17. }
  18. }
Success #stdin #stdout 0.08s 20444KB
stdin
Standard input is empty
stdout
Result: 3, 45, 000