Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: Substituting a comma only when it is preceded and followed by a bracket (closure)

by choroba (Chancellor)
on Nov 02, 2011 at 17:26 UTC ( #935451=note: print w/replies, xml ) Need Help??


in reply to Re: Substituting a comma only when it is preceded and followed by a bracket (closure)
in thread Substituting a comma only when it is preceded and followed by a bracket

Does not work for nested parentheses *ducks*
$s='aa, aaa, aaaa, aaa, (aaa, aaa, aaa, a), aaa, aaa, (aaa, aaa, (aaa, + aa), aaa, aaa), aaa, aaa';
  • Comment on Re^2: Substituting a comma only when it is preceded and followed by a bracket (closure)
  • Download Code

Replies are listed 'Best First'.
Re^3: Substituting a comma only when it is preceded and followed by a bracket (closure)
by tye (Sage) on Nov 02, 2011 at 17:32 UTC

    Ah, but I guess it beats BrowserUk's solution because it must be clearer that it doesn't work for nested parens else you wouldn't have left his un-replied-to for 22 minutes but replied to mine in 5 minutes when both fail for that same case. q-:

    - tye        

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://935451]
help
Chatterbox?
[stevieb]: Playing around with two DACs to control a single RGB LED (each DAC only has two outputs, LED has 3 inputs), and have realized that each of my IC RPi dists needs a wiring diagram, which is linked to within the documentation

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2017-08-20 19:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (317 votes). Check out past polls.

    Notices?