fork(27) download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. String[] tests = new[]{"Q1W2EE3R45T","WWED456J","ABC123"};
  9.  
  10. foreach (String test in tests)
  11. {
  12. Console.WriteLine("{0,-15} = {1}", test, Regex.Replace(test, @"[^\d]", String.Empty));
  13. }
  14. }
  15. }
Success #stdin #stdout 0.06s 38296KB
stdin
Standard input is empty
stdout
Q1W2EE3R45T     = 12345
WWED456J        = 456
ABC123          = 123