fork download
# Command-line params cannot be passed in in ideone,
# so I use the variable $x to simpulate the $* variable
# which normally contains an array of string representing the params:
$x = ["This 1 is22a 3352sentence 50", "3"]

a,b=$x
p a.gsub(/\d+/){|s|s.to_i*b.to_i}
Success #stdin #stdout 0.01s 7452KB
stdin
Standard input is empty
stdout
"This 3 is66a 10056sentence 150"