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;

Prints:

1 2=3 4=5 2=3 4=5

Perl is Huffman encoded by design.