in reply to Re: Regexp substitution on variable-length ranges with embedded code? (updated)
in thread Regexp substitution on variable-length ranges with embedded code?
Your solution works for me, with the addition of:
(I'm on Perl 5.12.)use re 'eval';
...but I don't understand it. Specifically, this line is the most difficult one for me:
(?(?{ $run[-1] - $run[-2] != 1 }) (*F))
Is that double-eval'ed or executed? What is the '*F' referencing, and what is the '$^N' from the lines above? I've never seen this kind of regex before.
Blessings,
~Polyglot~
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Regexp substitution on variable-length ranges with embedded code?
by AnomalousMonk (Archbishop) on May 26, 2021 at 14:59 UTC |
In Section
Seekers of Perl Wisdom