Skip to main content

How to combine multiple rows into one row in Notepad++ ?

How to combine multiple rows into one row in Notepad++ ?

Let's say you have copied some data from some source and pasted into Notepad++. And now you got something like this. But you want to combine all the data rows into one rows.

PloyMate9

There could be many ways to do that. Here I am sharing 2 simple and quick ways to it.
 
Method 1
Select all the data rows which you want to combine as one row.
And simply press Ctrl + J from keyboard, 
Or Go to Menu Edit --> Line Operations --> Join Lines
The benefit of using this method is, it automatically adds space between combined rows while making them as one .
PloyMate9

And you are done. Simple ! Isn't it ? 😃

PloyMate9

Method 2
You can make use to find/replace feature of Notepad++. 
Put the cursor to the first line and press Ctrl + h, it will open Replace window for you.
Now enter [\n\r]+ in Find what field. If you want to add a specific word or comma between 2 combined rows, enter that in  Replace with field.
Select Regular Expression radio button.
Click Replace All, and your done.

PloyMate9

If you find this useful, share it with your friends.

Subscribe for more such tricks coming in future.

Never Stop Learning. Have a Great Day !!

Do you know?


Comments