use warnings;
use strict;
my $string = q();
my @tokens = $string =~ /\s*(\w+=([\'\"]).*?\2|[^\s>]+)/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"
/