关于用notepad++确认代码中 空格等不显示的字符及替换

时间:2024-04-05 09:58:04

如图,CRLF就是不可见的,点击箭头指向能显示所有字符

关于用notepad++确认代码中\r\n\t空格等不显示的字符及替换

 

Replace "\n" with new line characters, using Notepad++

In case you have a file which contains “escaped” new lines (\n), like this:

关于用notepad++确认代码中\r\n\t空格等不显示的字符及替换

and you want to replace the escaped new line sequences with actual new line characters, you can easily accomplish this task using Notepad++.

First load your file (or just copy paste the text) in Notepad++.

and you want to replace the escaped new line sequences with actual new line characters, you can easily accomplish this task using Notepad++.

First load your file (or just copy paste the text) in Notepad++.
关于用notepad++确认代码中\r\n\t空格等不显示的字符及替换

Then select Search → Replace from the menu, or hit Ctrl-H. The Replace dialog will show up. Therein make sure that you fill out the following values; Find what: \\n (yes, two back-slashes), Replace with: \n (yes, just one back-slash), and the most important, make sure you select the Extended (\n, \r, \t, \0, \x, …) radio button. Your Replace dialog must look like this:

关于用notepad++确认代码中\r\n\t空格等不显示的字符及替换

Click the Replace All button, and all escaped new line sequences will be replaced with new line characters:

关于用notepad++确认代码中\r\n\t空格等不显示的字符及替换

I hope this helped!

This entry was posted in Uncategorized. Bookmark the permalink.

← PHP Extensions do not load on fresh WAMP installation

How to go off the record in Gmail when "Go off the record" is grayed →

76 Responses to Replace "\n" with new line characters, using Notepad++
 

参考链接:

https://blog.csdn.net/weixin_40886648/article/details/95335485

https://blog.csdn.net/yanchenyu365/article/details/83214778

这块我参照上面两个链接,将nc要发送的文件(http请求)中的CRLF替换成了LF。

如下图:

关于用notepad++确认代码中\r\n\t空格等不显示的字符及替换