in reply to Re: Can I get some help with a regex please
in thread Can I get some help with a regex please
After 30 years of programming Perl, and hours with Larry Wall and Damian and other gurus, my mindset is always CAN I DO THIS BETTER IN A REGEX?
Reluctantly , I sometimes have to capitulate and conclude NO, there is no "better regex approach". This MIGHT be that. The tite loop I showed was the shortest and clearest solution so far.
The real question is,
It would seem "perlish" to have this capacity. Like:are there RHS "tricks" I can do with $1 $2 ... ? like a way to repeat $1 $n times? And a way to know what iteration each is?
where $1 is repeated $n times.. Im not sure about a way to know which iteration its on- maybe a reserved PerlVar?s/(block)/$1{$n}/
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Can I get some help with a regex please
by cavac (Prior) on Jun 14, 2023 at 21:52 UTC |