>>>>> "M" == Matthew Bloch <mattbee / soup-kitchen.net> writes: M> my @matches = $data =~ /([\w\-\.]+:\d+)/g; See String#scan pigeon% ruby -e 'p "aa:12 bb:13 cc:14".scan(/[\w\-\.]+:\d+/)' ["aa:12", "bb:13", "cc:14"] pigeon% Guy Decoux