while( /(\w{1,2})$RE{balanced}{-parens=>"[]"}{-keep}/ ) { push @{ $hash{$1} }, substr($2, 1, length($2) - 2); }