in reply to splitting string based on length index

This seems too simple, which makes me suspicious that I've missed something?

$data = "five[5]=12345&ten[12]=12345=678=90&six[6]=123456"; $hash{ $1 } = $2 while $data =~ m/ ( [a-z]+ ) \[ \d+ \] = (.*?) (?= (?: & [a-z]+ \[ ) | $ ) /gx; print Dumper \%hash;; $VAR1 = { 'six' => '123456', 'five' => '12345', 'ten' => '12345=678=90' };

Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
"Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon