Syntactic Confectionery Delight | |
PerlMonks |
Re^3: Regexp substitution on variable-length ranges with embedded code?by The Perlman (Scribe) |
on May 27, 2021 at 11:27 UTC ( [id://11133120]=note: print w/replies, xml ) | Need Help?? |
One regex for both would be very complicated. But two regexes almost trivial now.
First regex should transform in comma separated list: 65:1:2,3,4,18 Second regex should apply shown technique to condense lists to ranges: 65:1:2-4,18
- Ron
In Section
Seekers of Perl Wisdom
|
|