Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Elegant examples to parse parenthesised strings

by Krambambuli (Curate)
on May 19, 2010 at 12:48 UTC ( #840686=note: print w/replies, xml ) Need Help??


in reply to Elegant examples to parse parenthesised strings

If, as it seems, you need only the innermost parenthesises, something like
my @exps = $text =~ / \( ( [^\(]*? ) \) /xmg;
might be good enough for this particular situation.


Krambambuli
---

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://840686]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (12)
As of 2017-03-30 11:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (356 votes). Check out past polls.