http://qs321.pair.com?node_id=11133120


in reply to Re^2: Regexp substitution on variable-length ranges with embedded code?
in thread Regexp substitution on variable-length ranges with embedded code?

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