I have a text file with a thousand lines of numbers like so:
402
115
90
...
As you can see there is a blank line in between each number that I want to remove so that I have
402
115
90
...
How can I do this?
I have a text file with a thousand lines of numbers like so:
402
115
90
...
As you can see there is a blank line in between each number that I want to remove so that I have
402
115
90
...
How can I do this?
Press Ctrl+H (Replace)
Select Extended
from SearchMode
Put \r\n\r\n
in Find What
Put \r\n
in ReplaceWith
Click on Replace All
As of NP++ V6.2.3 (nor sure about older versions) simply:
By the way, in Notepad++ there's built-in plugin that can handle this:
TextFX -> TextFX Edit -> Delete Blank Lines
(first press CTRL+A to select all).
This will remove any number of blank lines
CTRL + H to replace
Select Extended search mode
replace all \r\n
with (space)
then switch to regular expression and replace all \s+
with \n
You can record a macro that removes the first blank line, and positions the cursor correctly for the second line. Then you can repeat executing that macro.
This should get your sorted:
Ctrl + H
to bring up the 'Find and Replace' window.\r\n
Here's how it should look:
© 2022 - 2024 — McMap. All rights reserved.