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.