extract only number rom the string ruby code example Example: ruby extract number from string a.map {|x| x[/\d+/]}