Beefy Boxes and Bandwidth Generously Provided by pair Networks
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??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11133120]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-03-28 16:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found