fork download
  1. s = "abc 123 and 4"
  2. res = s.gsub(/\D+/, "")
  3. puts res
Success #stdin #stdout 0s 28216KB
stdin
Standard input is empty
stdout
1234