in reply to Re^2: AND and OR on Regular Expressions
in thread AND and OR on Regular Expressions
I would rather use:
$i++ while $pars =~ s/\(([^()]*)\)/$1/;Better way is to use Regexp::Common and balanced pattern (not tested):
use Regexp::Common; $pars =~ /^[^()]*$RE{balanced}{-parens=>'()'}[^()]*$/
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: AND and OR on Regular Expressions
by vitoco (Hermit) on Aug 26, 2009 at 14:51 UTC |