in reply to Re: Split tags and words nicely
in thread Split tags and words nicely
$a = q{<tag ref=1>Start<tag ref=2>and more</tag>and end</tag>}; my @b; $a =~ s/(<\/?tag[^>]*>)(\w*)/push @b, ($1,$2)/eg; map {print $_,"\n"} @b;
<tag ref=1> Start <tag ref=2> and </tag> and </tag>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Split tags and words nicely
by johngg (Canon) on Dec 29, 2006 at 10:37 UTC | |
by logie17 (Friar) on Dec 31, 2006 at 02:18 UTC |