Can we realize the replacement of line breaks through Notepad? After all, many formats will be retained during many copy-paste processes, such as copying from PDF. Next, I will explain how to do this.
Copy content (Recommended learning: notepad )
##Paste into the new txt.
Check the newline characters. The newline characters of different operating systems are different.
[View]-[Show symbols]-[Show end-of-line characters]. My operating system is windows, so the line ending character is CR LF - the corresponding regular expression is \r\n. The mac system is CR - the corresponding regular expression is \r. Unix system is LF - the corresponding regular expression is \n.Replacement operation
Shortcut key Ctrl H, [Find target] input [\ r\n], the content after replacement is determined by yourself, as shown in the figure below.Note: Be sure to select [Extended] here, otherwise it will not succeed.
Replace all and complete the newline replacement operation. The effect is shown in the figure below.
The above is the detailed content of How to replace newline characters in notepad++. For more information, please follow other related articles on the PHP Chinese website!