string = "1 chocolate bar at 25"p string.match(/(\d+) +(\D+) +at +(\d+)/).captures
Standard input is empty
["1", "chocolate bar", "25"]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!