perl -e '$str = "1 2 3 2 6=7 2=4 j=384923 34 43 j 3=6"; print "$_\n" foreach ($str =~ m/(\w+[\w\s]*=\w+)/g);' 1 2 3 2 6=7 2=4 j=384923 34 43 j 3=6