Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: RegEx for Matching paranthesis

by Taulmarill (Deacon)
on Feb 17, 2004 at 14:36 UTC ( [id://329603]=note: print w/replies, xml ) Need Help??


in reply to RegEx for Matching paranthesis

if you want only the text betwen the most left "(" and the most right ")" then this should do:
/^[^(]*(.*?)[^)]*$/

---edit---

oh, yes, after
$text =~ /^[^(]*(.*?)[^)]*$/;
the snippet you want is in $1.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2024-04-19 06:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found