XP is just a number | |
PerlMonks |
Re: Yet Another Rosetta Code Problem (Perl, Ruby, Python, Haskell, ...)by LanX (Saint) |
on Oct 20, 2021 at 14:25 UTC ( [id://11137799]=note: print w/replies, xml ) | Need Help?? |
I was missing a split solution with lookbehind and lookahead here, so I wanted to add it. (step by step demo with 'perl -de0')
Alas I couldn't find a way to "forget" the group needed for the backreference \1 ° But this could be turned into something more flexible by applying "pair" functions from List::Util (which were probably not available back then)
Cheers Rolf °) but I didn't search long, what I found is /n modifier, to turn each (...) into (?:...) , but then \1 isn't usable anymore
UpdateTho shorter tye's solution without split fits better here
In Section
Meditations
|
|