my (@articles) = ($text =~ /(<a name.*?<!--start-->.*?<!--end-->)/gs);
Of course this is doing two stingy matches in one pattern which is probably godawful slow.
Update: Or use a hash instead
my (%hash) = ($text =~ /(<a name.*?)(<!--start-->.*?<!--end-->)/gs);
In reply to Re: Split with data keep
by dbp
in thread Split with data keep
by Kage
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |