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 lastIn reply to Re: Re: split/matching/regex question
by Art_XIV
in thread split/matching/regex question
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |