use warnings; use strict; my $string = q(); my @tokens = $string =~ /]+)/g; # Get every other token my $i = 0; @tokens = grep {++$i % 2} @tokens; local $" = "\n"; print "@tokens\n"; #### a style='postion: top; font:roman' href=hi.html href='bold' src=" image" /