Search code examples
notepad++editing

Notepad++ Merge 2 lines into 1 line


I have the following text;

country=france
name=jean
country=germany
name=michael
country=england
name=jack

I want it to look like;

country=france name=jean
country=germany name=michael
country=england name=jack

How do I do this in Notepad++?


Solution

  • Use the extended replace functionality and replace "\r\nname" with " name"

    Substitute appropriate line ending characters for \r\n depending on the file.

    If it is from windows, use \r\n

    If it is from unix, use \n

    If it is from mac, use \r