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 = "5123456";
  10. var matches = Regex.Matches(s, @"\b(5\d{6}|1\d{5})\b");
  11. foreach (Match m in matches)
  12. Console.WriteLine(m.Value);
  13.  
  14. }
  15. }
Success #stdin #stdout 0.11s 24288KB
stdin
Standard input is empty
stdout
5123456