Keep It Simple, Stupid | |
PerlMonks |
Re: Regex funby moritz (Cardinal) |
on Dec 15, 2009 at 14:28 UTC ( [id://812878]=note: print w/replies, xml ) | Need Help?? |
which unfortunately does't do anything. I'd like to know why? Update: Just found that there are actually some 1s in the input. If all sequences are short, you can just generate them:
Should still be fairly efficient, especially with perl-5.10, which optimizes regex alternations with constant prefixes. Second update: Added a missing \+ JadeNB++ for noticing.
Perl 6 - links to (nearly) everything that is Perl 6.
In Section
Seekers of Perl Wisdom
|
|