in reply to Re: balanced parens regexp hangs
in thread balanced parens regexp hangs - solved

I run it on WinXP with ActiveState Perl v5.10.0. (build 1004).

Localizing helped solving my problem, but I removed non-greed and tried to use (?>...)* but I must admit I don't fully understand documentation of this construct yet. Did you think about something like this?

local $parens = qr{(?:(?>[^{}]*)|\{(??{$parens})\})*}x;

Replies are listed 'Best First'.
Re^3: balanced parens regexp hangs
by moritz (Cardinal) on Mar 27, 2009 at 09:07 UTC
      I agree. Thanks again!