I want to replace
#{account_nbr}
with
{{account_nbr}}
in the find, I tried this:
\#\{()\w+\1\}
and in the replace, this:
{{\$1}}
The find seems to work but I can't get the backreference correctly.
What's wrong?
You do not need any backreferences the way you are using them.
This is the regex you can use:
\#\{(\w+)\}
Replacement should be
{{$1}}
When you use \$
, a literal $
is used, not the actual back-reference.