开发者

Replace regular expression with \t in Notepad++

开发者 https://www.devze.com 2023-01-04 22:50 出处:网络
simple example in Notepad++ using RegEx replace search for: anything replace with (wanted): \\test guess for regex replace string: \\test

simple example in Notepad++ using RegEx replace

search for: anything

replace with (wanted): \test

  1. guess for regex replace string: \test

    results in: tabest, so the \t is interpreted as a tab

  2. guess for regex replace string: \\test

    results in: \ tabest, so the first \ is interpreted as a \, the \t is interpreted as a tab

  3. guess for regex replace string: \ test (spacein between \ and test)

    results in: \ test (spacein between \ and test)

How can I do this to get \test as the result? Are the开发者_开发知识库re any group or end of command characters for the replace string? Or an empty character that I can add after the \?

Thanks, Axel


This seems to be an open issue with notepad++.


How about replacing with \\test? Usually \ must be escaped with \.


Try 3 backslashes, this kind of thing often works in other tools/languages.


\\test should do the trick. Try it and let me know.

0

精彩评论

暂无评论...
验证码 换一张
取 消