using System;
using System.Text.RegularExpressions;
public class Test
{
public static void Main()
{
String test ="Q1W2-hjkxas1-EE3R4-5T";
Regex rgx = new Regex("[^0-9-]");
Console.WriteLine(rgx.Replace(test, ""));
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uVGV4dC5SZWd1bGFyRXhwcmVzc2lvbnM7CgpwdWJsaWMgY2xhc3MgVGVzdAp7CglwdWJsaWMgc3RhdGljIHZvaWQgTWFpbigpCgl7CgkKCgkJCVN0cmluZyB0ZXN0ID0iUTFXMi1oamt4YXMxLUVFM1I0LTVUIjsKCQkJUmVnZXggcmd4ID0gbmV3IFJlZ2V4KCJbXjAtOS1dIik7CgkJCUNvbnNvbGUuV3JpdGVMaW5lKHJneC5SZXBsYWNlKHRlc3QsICIiKSk7CgkJCgl9Cn0=