在 Notepad++ 中用换行符替换 \r\n

C. *_*oss 101 text-editing notepad++

如何用相同的字符替换字符串“\r\n”?

例子:

Hello World.\r\nHello World.
Run Code Online (Sandbox Code Playgroud)

替换为:

Hello World.
Hello World.
Run Code Online (Sandbox Code Playgroud)

drr*_*lvn 170

CTRL-h,将打开替换对话框。键入\\r\\n在“查找内容”,并\r\n在“替换”。最后,选择搜索模式扩展(\r、\n、\t、\x...、\0)并单击“全部替换”。

  • 也适用于程序员的记事本。选择“允许反斜杠表达式”并执行相同操作 (2认同)
  • 搜索模式必须“扩展”才能工作。 (2认同)

C. *_*oss 10

在查找屏幕中,在替换选项卡上选择扩展搜索。
在查找文本框中放置\\r\\n,并在替换文本框中放置\r\n