in reply to regex grouping
This would seem to be what you want:
use strict; use warnings; my $str = "1 2=3 4=5"; print "$str\n"; my @strs = $str =~ m/(\w+=\w+)/g; print "$_\n" foreach @strs; [download]
Prints:
1 2=3 4=5 2=3 4=5 [download]