Home  >  Article  >  Development Tools  >  How to replace carriage return in notepad++

How to replace carriage return in notepad++

(*-*)浩
(*-*)浩Original
2019-08-19 14:17:256209browse

Can we implement the operation of replacing carriage return and line feed characters 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.

How to replace carriage return in notepad++

Copy content (Recommended learning: notepad )

How to replace carriage return in notepad++

##Paste it into the new txt.

How to replace carriage return in notepad++

Check the line feed characters. The carriage return and line feed 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.

How to replace carriage return in notepad++

How to replace carriage return in notepad++

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.

How to replace carriage return in notepad++

Replace all, complete the carriage return and line feed character replacement operation, the effect is shown in the figure below.

How to replace carriage return in notepad++

The above is the detailed content of How to replace carriage return in notepad++. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn