Ctrl-J (join lines) replaces LF with space
-
I have a private key in pem format that is split into multiple lines by line feeds. I wanted to concatenate those lines into a single line.
Pasted the key text into a new tab, selected the lines and issued a Ctrl-J. This resulted in a single line, but each LF was replaced by a space.
This is in v8.9.6.4 (64-bit) on Win 11.
-
Hello, @dougk.az and All,
I suppose that using this simple regex replacement, below, should work !
-
Open your text in N++
-
Move back at the very beginning of your file
-
Open the Replace dialog (
Ctrl + H) -
Uncheck all box options
-
FIND
\r\n? -
REPLACE
Leave EMPTY -
Check the
Wrap aroundoption -
Select the
Regular expressionsearch mode -
Click, once, on the
Replace Allbutton
Here you are !
To verify that all your lines are just concatenated, without any char in between, simply use the
¶icon of the Toolbar. All theLFcharacters are preserved !Best Regards,
guy038
-
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login