NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Leather appointed version! (Score:1)
Holy hell did those
@-and@+semantics ever turn my brain to mush. This was far harder than it promised to be.Reply to This
Re:Leather appointed version! (Score:2)
Re:Leather appointed version! (Score:1)
Re:Leather appointed version! (Score:2)
Re:Leather appointed version! (Score:1)
Thanks, but your fix is wrong. It introduces a bug in my initial tests. Apparently neither of us tested with sufficiently diverse patterns. The real fix is:
Yeah, I know what you're thinking. D'oh.
At this point I realized that it almost looked like a common rather than a special case and
Re:Leather appointed version! (Score:2)
The bug I was concerned with initially was that extra colors should be ignored, and if insufficient colors are provided, then the uncolored captures should get the same color as the uncaptured matched text.
The bug that sidetracked me was the handling of nested matches.
I'd be curious to hear if this monstrosity [perl.org] correctly handled your test cases too..