laziness, impatience, and hubris | |
PerlMonks |
Re: In need of a stupid regex trickby David Caughell (Monk) |
on Jan 04, 2004 at 22:38 UTC ( [id://318714]=note: print w/replies, xml ) | Need Help?? |
My instincts were that it can be done, since regex's are where perl really shines. I'm still learning the language, so I've decided to give this a shot just for fun. Jweed's elegant solution (and whoever put it out on cpan) is the best if you're doing this sort of thing for any other purpose than learning the language, though. Now on to something not quite so elegant:
OOC, is it possible to put a character group (and quantify it with a * + ? or {} ) into a look-ahead match? Crap, this isn't quite there yet. The four and five are sticking together. If anyone has suggestions on how to fix that, I'd appreciate it. $scratchpad_public = 0 unless $scratchpad;
In Section
Seekers of Perl Wisdom
|
|