简体   繁体   中英

Replace regular expression with \t in Notepad++

simple example in Notepad++ using RegEx replace
search for: anything
replace with (wanted): \\test

  1. guess for regex replace string: \\test
    results in: tab est , so the \\t is interpreted as a tab

  2. guess for regex replace string: \\\\test
    results in: \\ tab est , so the first \\ is interpreted as a \\, the \\t is interpreted as a tab

  3. guess for regex replace string: \\ test ( space in between \\ and test)
    results in: \\ test ( space in between \\ and test)

How can I do this to get \\test as the result? Are there any group or end of command characters for the replace string? Or an empty character that I can add after the \\?

Thanks, Axel

这似乎是记事本++的一个悬而未决的问题

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

尝试3个反斜杠,这种事情通常适用于其他工具/语言。

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM