Community
    • Login

    Remove duplicate lines not possible?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    24 Posts 6 Posters 4.5k 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.
    • CletosC
      Cletos
      last edited by

      Hello guy038,

      Thank you you very much for the new method!

      1 Reply Last reply Reply Quote 1
      • Alan KilbornA
        Alan Kilborn @Sofistanpp
        last edited by Alan Kilborn

        @Sofistanpp

        run that regex in backward direction from the last line

        Searching backwards with regex is “discouraged” and is partially disabled in Notepad++.
        The reason, I think, is that thru a given text, if you search backwards versus forwards, you won’t get the same hits. Sometimes (simpler regexes, as you noted) you will, but not always (depends upon the regex and maybe the data).

        Enabled the Backward direction button via an AutoHotkey script

        In general, enabling disabled controls and then performing an operation and expecting good results is a dubious premise.

        1 Reply Last reply Reply Quote 2
        • endolithE
          endolith @Cletos
          last edited by endolith

          @Cletos Yes this feature is buggy, I see it fairly often. Usually I can click “Remove duplicate lines” and it removes them all, regardless of order, but sometimes it doesn’t remove any of them. Something wrong with the software, but I can’t pinpoint what’s wrong. It depends on the text? Or I have to create a new blank document and then it works there, and then copy it back into the original?

          Alan KilbornA 1 Reply Last reply Reply Quote 0
          • Alan KilbornA
            Alan Kilborn @endolith
            last edited by

            @endolith said in Remove duplicate lines not possible?:

            It depends on the text?

            Could be a line-ending problem?
            If line-endings are different on otherwise duplicate lines, they won’t be considered true duplicates.

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