using System;
using System.Text.RegularExpressions;
public class Test
{
public static void Main()
{
String[] tests = new[]{"Q1W2EE3R45T","WWED456J","ABC123"};
foreach (String test in tests)
{
Console.WriteLine("{0,-15} = {1}", test, Regex.Replace(test, @"[^\d]", String.Empty));
}
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uVGV4dC5SZWd1bGFyRXhwcmVzc2lvbnM7CgpwdWJsaWMgY2xhc3MgVGVzdAp7CglwdWJsaWMgc3RhdGljIHZvaWQgTWFpbigpCgl7CgkJU3RyaW5nW10gdGVzdHMgPSBuZXdbXXsiUTFXMkVFM1I0NVQiLCJXV0VENDU2SiIsIkFCQzEyMyJ9OwoKCQlmb3JlYWNoIChTdHJpbmcgdGVzdCBpbiB0ZXN0cykKCQl7CgkJCUNvbnNvbGUuV3JpdGVMaW5lKCJ7MCwtMTV9ID0gezF9IiwgdGVzdCwgUmVnZXguUmVwbGFjZSh0ZXN0LCBAIlteXGRdIiwgU3RyaW5nLkVtcHR5KSk7CgkJfQoJfQp9