s = "I have 12 goats, 3988 otters, 224 shrimps and 456 giraffes" p x = s.match(/\b\d{3}\b/).to_s
Standard input is empty
"224"
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!