• Login
Community
  • Login

Find repeating lines in a line?

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
3 Posts 3 Posters 379 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D
    Digi Uzman
    last edited by Nov 16, 2022, 4:23 PM

    Hello, I would be very happy if you could help.

    I made a serious mistake and I need your help to fix this mistake.

    I have a txt file with 1 million lines and a list of keys of 42 characters contiguous on each line.

    The problem is that I have a 2nd txt file in the same way, but there are 25 million lines and I need to extract the matches from the 1st file.

    How can I do this with notepad++?

    I’m sorry for my bad english

    Thank you very much for your help in advance.

    P N 2 Replies Last reply Nov 16, 2022, 5:29 PM Reply Quote 0
    • P
      PeterJones @Digi Uzman
      last edited by Nov 16, 2022, 5:29 PM

      @Digi-Uzman ,

      You want to find every line in FILE2 that matches a line from FILE1?

      No, Notepad++ does not do that natively. Using a scripting plugin, you might be able to code something up to do it inside notepad++; or using any programming language you know, it could be done in that programming language. But it’s not something that Notepad++ itself does.

      1 Reply Last reply Reply Quote 1
      • N
        Neil Schipper @Digi Uzman
        last edited by Neil Schipper Nov 16, 2022, 6:28 PM Nov 16, 2022, 6:26 PM

        @Digi-Uzman

        When you say extract, what exactly do you mean? Do you want them deleted? Or is it good enough to simply identify them so you can take further action?

        Do you care about preserving the original order of lines in the file that needs to change (if a file will change)?

        It would be best if you could provide three

        sample text blocks (see FAQ, find section on "literal text boxes: used in many other posts on this site).
        

        https://community.notepad-plus-plus.org/topic/21925/faq-desk-formatting-forum-posts

        Show file1 sample text and file2 sample text, making sure to include both cases that do and do not have matches, maybe 5 - 20 lines each, and then in the third show exactly what you want to end up with.

        I’m fairly certain what you want can be done. If order preservation is important it might be a multi-step process.

        1 Reply Last reply Reply Quote 1
        2 out of 3
        • First post
          2/3
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors