Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Regexp for Match Brackets

by gopalr (Priest)
on May 05, 2006 at 06:33 UTC ( [id://547596]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    my $text='(one dfd(two(three)four()(five)df())df)';
    
    print $& if $text=~m#(\([^()]*(\([^()]*\))+[^)]*\))+#;
    
  2. or download this
    (two(three)four()
    
  3. or download this
    (one dfd(two(three)four()(five)df())df)
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-26 06:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found