P is for Practical | |
PerlMonks |
comment on |
( [id://3333]=superdoc: 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 reply to Re^3: Regexp substitution on variable-length ranges with embedded code?
by The Perlman
|
|