while ( $text =~ m/<!--start-->(.*?)<--end-->/s ) { my $chunk = $1; if ( $chunk =~ /<a name="(.+?)"></a>/ ) { # do something with $1 } else { # do something with $chunk } }
In reply to Re: Split with data keep
by dws
in thread Split with data keep
by Kage
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |