m/ \$\{( [^\{\$\}]* (?: \$\{ [^\$\{\}]+ \} [^\$\{\}]* )* )\} /gxs;