if ( $string_exp =~ m/\Q$placeholder\E(.*?)((\$\{)|\z)/ ) { print "\"$1\"\n"; }