notepad++ How to delete a blank line

Source: Internet
Author: User
Tags regular expression

notepad++ How to delete a blank line

The first method: Do not need to use regular expressions, using the system's own functions can be implemented

The second method: through regular expressions

1, RN escape character replacement

Press Ctrl+h to jump out of the search Replace box and define the lookup mode as an extension (N,r ...)

Find target: RNRN

To be replaced by: RN

Or

Select Replace, set the lookup mode to regular expression, enter ^s+ in the lookup box, leave the replacement box blank, point "Replace All", then (select All).

Find target: ^s+

To be replaced by: leave blank

The Third way: Download Install plugin Textfx

Download and install the plugin textfx, download and restart, and then in the menu bar to find Textfx-> textfx Edit-> Delete blank lines, you can.

Remember to select a good area before use, and then in the operation.

Here are some additional

Now, we use regular expressions to replace multiple empty rows with just one blank line.

Here are some continuation of the line

notepad++ use regular expression lookup, you first need to check the "regular expression (E)" in the lower-left part of the Find/Replace Window

The RN represents a newline, where r represents a carriage return

S space

1. Replace the specified character with a newline character, such as replacing "," in a CSV file with a newline character

Find the target:,

To be replaced by: RN

2. Indent first line, add 4 spaces before each line

Find target: RN

To be replaced by: rn {four half-width spaces}

3. Insert a blank line after each newline

Find target: RN

To be replaced by: RNRN

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.