fork(29) download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8.  
  9.  
  10. String test ="Q1W2-hjkxas1-EE3R4-5T";
  11. Regex rgx = new Regex("[^0-9-]");
  12. Console.WriteLine(rgx.Replace(test, ""));
  13.  
  14. }
  15. }
Success #stdin #stdout 0.12s 24704KB
stdin
Standard input is empty
stdout
12-1-34-5