Notepad++ regex Replace, using match variables

In Notepad++, I want to perform a find-and-replace, providing a variable in the 'Replace with' field, which references a match from the 'Find what' field. Any ideas?

I tried supplying (find) foo (\w) bar (replace) foo baz ($1) bar qux. That didn't work.


Solution 1:

Notepad++ uses standard POSIX regular expressions. As such, backreferences should use the slash instead of the dollar-sign:

Find    : foo (\w) bar
Replace : foo baz (\1) bar qux