in reply to Re: split/matching/regex question
in thread split/matching/regex question
Expanding upon Roy Johnson's example:
use strict; use warnings; my $longstring = "first<!--NEWENTRY889700-->second third<!--NEWENTRY86 +7530-->last"; my @entries = split /<!--NEWENTRY(\d{6})-->/, $longstring; print "@entries\n";
prints:
first 889700 second third 867530 last
|
|---|