$_ = "foo<span>bar</span>bazqux<span>quux</span>"; my $c=0; s( (<span>|</span>|(.)) ) { defined $2 ? $1 . (++$c % 4 ? '' : "\n") : $1; }sxge; print; print "\n";
Makeshifts last the longest.
In reply to Re^4: highlight and line breaks
by Aristotle
in thread highlight and line breaks
by glwtta
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |