• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Gokul Deepak

GoCool and Debug

  • Home
  • WordPress
  • Android
  • How to
  • About Me
Home » Notepad++ » Combine two separate files line by line in Notepad++

Combine two separate files line by line in Notepad++

August 26, 2020 by GokulDeepak Leave a Comment

Problem:

I need to combine two separate files line by line.

For Eg:
Consider I have two text files file 1 and file 2.
File 1 contains the following text

Start of Line 1
Start of Line 2
Start of Line 3
.
.
.
Start of Line N

File 2 Contains the following text

End of Line 1
End of Line 2
End of Line 3
.
.
.
End of Line N

Solution:

  1. Open a new tab ( Ctrl + N )
  2. Select the contents of File 1 and paste them in this new tab
  3. Write any symbols in a new line. Eg: ______ ( Type 3 _ characters )
  4. Select the contents of File 2 and paste them, in the new tab, BELOW the ___ line
  5. Open the Replace dialog ( Ctrl + H )
  6. SEARCH : (?s)^___.+|(?-s)^.*(?=\R(?:.*\R){n}(^.*)) ( Just replace n with the appropriate number of lines )
  7. REPLACE: ?1$0\1
  8. OPTIONS: Wrap Around and Regular expression set. All other options unticked
  9. ACTION: Click on the Replace All button

Result:

File 3

Start of Line 1End of Line 1
Start of Line 2End of Line 2
Start of Line 3End of Line 3
..
..
..
Start of Line NEnd of Line N


Related

Filed Under: Notepad++

Authored by Gokul Deepak S

Reader Interactions

Leave a Reply Cancel reply

Primary Sidebar

Popular Posts

  • How to find the date of the Facebook group it was created
  • Home
  • Downgrade from Lollipop to Kitkat for Micromax Canvas A1 (Android One)
  • How to remove Linux OS in Tamilnadu Government Free Laptop
  • How to block access to the wp-content uploads folder
  • How to add ads.txt on Bluehost
  • Combine two separate files line by line in Notepad++

Recent Posts

  • Can’t connect to Ubuntu with SSH
  • Change Timezone in Ubuntu 20.04 – Simple method
  • Output for timedatectl list-timezones
  • PM2 Cheatsheet – Important Commands
  • MongoDB Terminal commands – Cheatsheet

Archives

Categories

  • Android
  • Apache
  • Blogger
  • Computer Tips
  • Earn
  • Facebook Tips
  • Git
  • Google Tips
  • How to
  • Laptop Tips
  • Laptops
  • Linux
  • Mobile
  • MongoDB
  • Nginx
  • Notepad++
  • PostgresQL
  • Ubuntu
  • Wordpress
  • Xenforo

Tags

Android Android One Bluehost Comparisions Custom ROM Elementor Facebook Genesis Genesis Sample Theme Google Drive How to Lineage OS OnePlus One OwnCloud Rooting Smartphones Stock ROM Studiopress Wordpress plugin

Copyright © 2021 ยท Maintained by GokulDeepak