Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: Regexp substitution on variable-length ranges with embedded code?

by The Perlman (Scribe)
on May 27, 2021 at 11:27 UTC ( #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
  • Comment on Re^3: Regexp substitution on variable-length ranges with embedded code?

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? | Other CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2022-05-26 02:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (92 votes). Check out past polls.

    Notices?