1

I have an output of three lines that I want to merge in one line in notepad++ and be able to copy and paste it in excel in one cell (of course the cell will be stretched). Ctrl + J normally does this but I don't want to press ctrl + J 4000 times.

For example my file is like this

2. Zea mays uncharacterized LOC100192625 (LOC100192625), mRNA
640 bp linear mRNA 
NM_001137839.1 GI:212721527

and I need it to be as follows:

2. Zea mays uncharacterized LOC100192625 (LOC100192625), mRNA 640 bp linear mRNA NM_001137839.1 GI:21272152

I looked at other examples online where a similar question was answered but it introduced tabs in the line which when I pasted in excel resulted in one line to be separated into three cells within the same row. I don't want that I need the 3 lines in notepad++ to merged into one line and for that one line to be pasted in one cell in excel please and not be separated in cells.

Could anyone help??

2

How do I merge every 3 lines?

  • Menu "Search" > "Replace" (or Ctrl + H)

  • Set "Find what" to ^(.*)(?:\r?\n?|$)(.*)(?:\r?\n?|$)(.*)$

  • Set "Replace with" to \1 \2 \3

  • Enable "Regular expression"

  • Click "Replace All"

    enter image description here

Before:

2. Zea mays uncharacterized LOC100192625 (LOC100192625), mRNA
640 bp linear mRNA
NM_001137839.1 GI:212721527
2. Zea mays uncharacterized LOC100192625 (LOC100192625), mRNA
640 bp linear mRNA
NM_001137839.1 GI:212721527
2. Zea mays uncharacterized LOC100192625 (LOC100192625), mRNA
640 bp linear mRNA
NM_001137839.1 GI:212721527

After:

2. Zea mays uncharacterized LOC100192625 (LOC100192625), mRNA 640 bp linear mRNA NM_001137839.1 GI:212721527
2. Zea mays uncharacterized LOC100192625 (LOC100192625), mRNA 640 bp linear mRNA NM_001137839.1 GI:212721527
2. Zea mays uncharacterized LOC100192625 (LOC100192625), mRNA 640 bp linear mRNA NM_001137839.1 GI:212721527

Further reading

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.