$str =~ /$RE{balanced}{-parens=>'{}'}/ and substr $str. $-[0] + 1, $+[0] - $-[0] - 2, 'REPLACEMENT'