Notepad++ Regex Replace doesn't work on Notepad++

前端 未结 2 1278
鱼传尺愫
鱼传尺愫 2021-02-02 08:11

I tried to search for every word that has
bar-foo and switch them to foo-bar
so I wrote on the find (\\w+)-(\\w+)
and on the replace $2-$1

相关标签:
2条回答
  • 2021-02-02 08:33

    Use \2 \1 in the replace field.

    Notepad++ uses the linux like \1 syntax instead of $1

    0 讨论(0)
  • 2021-02-02 08:41

    With notepad++ you'll need to use \2-\1 as the replacement string.

    Sources :
    Mark's Speechblog

    0 讨论(0)
提交回复
热议问题