P is for Practical | |
PerlMonks |
Re: RegEx for Matching paranthesisby Taulmarill (Deacon) |
on Feb 17, 2004 at 14:36 UTC ( [id://329603]=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Seekers of Perl Wisdom
|
|