in reply to Regex help
By placing the + outside of the first "parened" $pattern, you allow more than one - then, put some parens around that to catpure the results to $2.my ($start,$middle,$end) = $string =~ /^(.*?)(($pattern)+)(.*?)$/g;
Hope this helps, :)
UPDATE:UPDATE 2:my ($start,$middle,undef,$end) = $string =~ ...
UPDATE 3:
split! of course! i like it!
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Regex help
by CombatSquirrel (Hermit) on Aug 24, 2003 at 15:39 UTC | |
|
Re: Re: Regex help
by BrowserUk (Patriarch) on Aug 24, 2003 at 15:44 UTC | |
|
Re: Re: Regex help
by gri6507 (Deacon) on Aug 24, 2003 at 15:35 UTC |