Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要\n在文件中使用查找新行 ().txt并用退格 () 替换它们\b。在 Notepad++ 的查找和替换功能中使用此功能可以成功找到新行 ( \n),但会将它们替换为字符“\b”,而不是应用退格键。如何正确地做到这一点?
\n
.txt
\b
\r\n应该管用。
\r\n
用空字段替换它们,您将获得\b等效的退格()
一个简单的方法是Ctrl+J或 Edit->Line Operations->Join Lines
我也试图用退格替换 \n,但上述解决方案似乎很简洁。也许它可以帮助某人。
(我尝试了 \r\n 解决方案,似乎两者的工作方式相同:))
使用正则表达式,在Find what:中输入\r\n并在Replace with:中将其留空。
在记事本++中,
转到编辑菜单,行操作,然后单击“删除空行”您会得到您正在尝试使用正则表达式的内容。
删除空行