in reply to Regexp::Common balanced curlies substitution

my $arg1 = qr/\s*{($RE{balanced}{-parens=>'{ }'})}/;
[]s, HTH, Massa (κς,πμ,πλ)

Replies are listed 'Best First'.
Re^2: Regexp::Common balanced curlies substitution
by kyle (Abbot) on Aug 16, 2008 at 03:12 UTC

    That doesn't work when I try it. With the extra braces there, the pattern no longer matches at all, and the s/// replacement just doesn't do anything. The $RE{balanced}{-parens=>'{ }'} pattern already includes braces, so your suggestion would only match a {{double braced}} string, which isn't what the OP has.