|
|
| P is for Practical | |
| PerlMonks |
Re^3: Split string after 14 Line Feeds? (//g)by tye (Cardinal) |
| on Dec 04, 2012 at 05:24 UTC ( #1006999=note: print w/ replies, xml ) | Need Help?? |
|
Indeed. I conflated two similar techniques: getting a list of matches from /(...)/g and getting a list of matches from /(...)(...)(...)/. You don't get a list of matches from /(...)*/ (nor from /(...)*/g). What I should have written was:
(tested even; works even) Update: Changed last * to + to eliminate extra empty string in result that I just noticed which is due to "quirk" in Perl regex processing (something I think we should just 'fix', but that is a story for another node, one I've written at least once already). - tye
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||