@a = $string =~/ ( #capture matches and put them into @a (?:\d+) | (?:"(?:.+?)") ) /gx; print Dumper \@a;