Community
    • Login

    Something like "negative" search?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 3 Posters 2.5k Views 1 Watching
    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.
    • H Offline
      hobbycoder
      last edited by

      Hey Community, can someone tell me if Notepad++ is able to list files with a negative search string.
      I often use the feature to replace patterns in all opened files or in all files in a certain folder. But let’s say I have 111 files in a folder and a certain string is missing in 11 of them, can NP++ then show me which of these files are lacking that string and how can I do that?

      EkopalypseE 1 Reply Last reply Reply Quote 0
      • EkopalypseE Offline
        Ekopalypse @hobbycoder
        last edited by

        @hobbycoder,

        maybe with something like this: ^(?!.*this_is_not_included).*

        You can find more information on this topic here.

        H 1 Reply Last reply Reply Quote 2
        • Alan KilbornA Offline
          Alan Kilborn
          last edited by

          @hobbycoder

          I would take the advice found HERE, and thus for the example @Ekopalypse started:

          find: (?s-i)\A(?:(?!\Qthis_is_not_included\E).)+\z

          Of course the search mode is Regular expression for this.

          1 Reply Last reply Reply Quote 1
          • H Offline
            hobbycoder @Ekopalypse
            last edited by

            @ekopalypse said in Something like "negative" search?:

            ^(?!.this_is_not_included).

            Thx for your reply. Unfortunatly that seems not to work. I will look into the thread you mentioned.

            1 Reply Last reply Reply Quote 1

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors