![]() |
|
Perl: the Markov chain saw | |
PerlMonks |
Re: Regexp substitution on variable-length ranges with embedded code?by LanX (Sage) |
on May 26, 2021 at 13:03 UTC ( #11133060=note: print w/replies, xml ) | Need Help?? |
IF sequences are always consecutive and never interrupted, one could try to grab the first and the last of each sequence and replace each sequence in a loop. BUT you need to be sure that neither
Still I wouldn't choose to embed Perl into a regex to solve that. That's only complicating things, because the complex logic would be only obfuscated
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|