s = 'a5bc2cdf3'puts s.gsub(/([a-zA-Z]+)(\d+)/){$1*$2.to_i}
Standard input is empty
aaaaabcbccdfcdfcdf
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!