in reply to Peeling the Peelings

/([^\(]*\(){$level}(.*)\)?/ should get you the level you want ($level is used as a quantifier, inside curlies).

Replies are listed 'Best First'.
Re: Re: Peeling the Peelings
by PetaMem (Priest) on Jul 01, 2003 at 19:29 UTC
    There's a little quirk with this:
    "hello(what(is(this(all(about)))))" 4
    get_proparg returned: "all(about)"
    Fastpath: "all(about)))))"
    
    "Fastpath" is your solution. It also doesn't behave very well if I $level is a higher number than there already are nested levels - unfortunatedly you never know before how many there are.

    Bye
     PetaMem
        All Perl:   MT, NLP, NLU