in reply to Re: Regex operation optimisation
in thread Regex operation optimisation

A non-greedy quantifier could be used to match only the first closing parenthesis.

s/\(.*?\)//

Replies are listed 'Best First'.
Re^3: Regex operation optimisation
by JavaFan (Canon) on Jul 05, 2010 at 10:40 UTC
    That turns "foo (bar (baz) qux) quux" into "foo  qux) quux". I'd be very surprised if the OP wants that to happen.