Community
    • Login

    [Wishlist] Reverse search

    Scheduled Pinned Locked Moved General Discussion
    6 Posts 5 Posters 547 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.
    • Dario de Judicibus 0D
      Dario de Judicibus 0
      last edited by Dario de Judicibus 0

      It might be useful to have an option when you search in files to select all the files where the search fails. It should work for both normal search and regular expressions. For example, select all files where there is not word “Abracadabra” in folder c:\wizard.

      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA
        Alan Kilborn @Dario de Judicibus 0
        last edited by Alan Kilborn

        @Dario-de-Judicibus-0

        Do a regular expression search for (?s-i)\A(?:(?!\QYour Expression\E).)+\z
        where, in your example, Your Expression = Abracadabra

        Reference: https://community.notepad-plus-plus.org/topic/19134 Mar 31, 2020, 9:57 AM posting

        1 Reply Last reply Reply Quote 4
        • Michael PiscoM
          Michael Pisco
          last edited by

          There already is a reverse search option

          3ad3bdb4-d45d-4998-82af-cf6b6fc491f0-image.png

          PeterJonesP 1 Reply Last reply Reply Quote 0
          • PeterJonesP
            PeterJones @Michael Pisco
            last edited by

            @Michael-Pisco ,

            There already is a reverse search option

            Re-read the original post, not just the title: they didn’t want “search backwards in document”, they wanted “all files that do not contain”.

            1 Reply Last reply Reply Quote 1
            • Mark OlsonM
              Mark Olson
              last edited by

              Fairly sure that (?s-i)\A(?!.*\QYour expression\E). (or with the (?s) flag instead if ignoring case) is a rather simpler but equally effective alternative to AlanKilborn’s regular expression.

              Note that I have a . after the negative lookahead because Notepad++ sometimes ignores empty matches and this ensures that the match is not empty.

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

                @Mark-Olson said in [Wishlist] Reverse search:

                is a rather simpler but equally effective alternative to AlanKilborn’s regular expression.

                Not mine! See the linked posting.

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