my @variables = $str =~ /(\w+\=)\&/g; print "$_\n" foreach @variables;