language: C# (mono-2.8)
date: 428 days 3 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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));
                }
        }
}