我如何才能找到/替换所有CR/LF字符在notepad++ ?
我正在寻找一些相当于微软Word中的^p特殊字符。
我如何才能找到/替换所有CR/LF字符在notepad++ ?
我正在寻找一些相当于微软Word中的^p特殊字符。
当前回答
这似乎是一个常见问题,提供的解决方案是:
Simple search (Ctrl+H) without regexp You can turn on View/Show End of Line or view/Show All, and select the now visible newline characters. Then when you start the command some characters matching the newline character will be pasted into the search field. Matches will be replaced by the replace string, unlike in regex mode. Note 1: If you select them with the mouse, start just before them and drag to the start of the next line. Dragging to the end of the line won't work. Note 2: You can't copy and paste them into the field yourself. Advanced search (Ctrl+R) without regexp Ctrl+M will insert something that matches newlines. They will be replaced by the replace string.
其他回答
CRLF图像
不含CRLF的图像
我发现它的工作方式是使用替换功能,并使用“\n”,与“扩展”模式。我使用的是5.8.5版本。
在2013年v6.13或更高版本中,使用:
菜单编辑→EOL转换→Windows格式。
假设它有一个“正则表达式”搜索,寻找\r\n。我更喜欢\r?\n,因为一些文件不使用回车。
编辑:感谢你的反馈,无论谁投了反对票。我了解到……没有,因为你没有提供任何反馈。为什么这是错误的?
做这个设置。菜单->视图->显示符号->取消勾选显示行结束