fork(6) 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 = "You id is (1) and your number is (0000000000)";
  12. var results = Regex.Matches(s, @"\((\d+)\)")
  13. .Cast<Match>()
  14. .Select(m => m.Groups[1].Value)
  15. .ToList();
  16. foreach (var v in results)
  17. Console.WriteLine(v);
  18. }
  19. }
Success #stdin #stdout 0.07s 20352KB
stdin
Standard input is empty
stdout
1
0000000000