Notepad ++ Regex Replace not working on Notepad ++

I tried to find every word that bar-foo has and switch them to foo-bar
so I wrote on the find (\w+)-(\w+)
and on the replacement of $2-$1
and instead of writing foo-bar he wrote $ 2- $ 1.

Yes, regular expression in search mode is enabled.
It seems that Replace Regex is not working and literally

+33
regex notepad ++
Aug 24 2018-10-12T00:
source share
2 answers

In notepad ++ you will need \2-\1 as a replacement string.

Sources:
Mark speechblog

+52
Aug 24 '10 at 12:53
source share
+9
Aug 24 '10 at 12:54
source share



All Articles