fork(4) download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. var s = "abc 123 and 4";
  9. var res = Regex.Replace(s, @"\D+", "");
  10. Console.Write(res);
  11. }
  12. }
Success #stdin #stdout 0.02s 134208KB
stdin
Standard input is empty
stdout
1234