• Login
Community
  • Login

Feature request: Search in searched results

Scheduled Pinned Locked Moved General Discussion
4 Posts 2 Posters 2.0k 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.
  • F
    FelipeR Ricardo
    last edited by Aug 15, 2017, 4:09 PM

    Hi, I want search a phrase and after, search other in their results.

    Example:

    file1.txt: THE HOUSE IS WHITE AND THE CAR IS RED.
    file2.js: // THE HOUSE IS WHITE AND THE CAR IS GREEN
    file3.txt: THE HOUSES ARE GREEN
    file4.log: THE PLANES ARE WHITE AND THE SKY IS BLUE

    I want search the files that contains the words “HOUSE”, “WHITE”, “GREEN”

    Search1 “HOUSE”: Results: file1.txt, file2.js, file3.txt
    Search2 “WHITE”: Results: file1.txt, file2.js
    Search3 “GREEN”: file2.js

    Thank you.

    S 2 Replies Last reply Aug 15, 2017, 5:55 PM Reply Quote 0
    • S
      Scott Sumner @FelipeR Ricardo
      last edited by Scott Sumner Aug 15, 2017, 5:56 PM Aug 15, 2017, 5:55 PM

      @FelipeR-Ricardo

      Revised answer soon…

      1 Reply Last reply Reply Quote 0
      • S
        Scott Sumner @FelipeR Ricardo
        last edited by Scott Sumner Aug 15, 2017, 6:04 PM Aug 15, 2017, 6:02 PM

        @FelipeR-Ricardo

        I think you can already do this…or at least something very close. Here’s what I tried based upon your example:

        Find All in All Opened Documents for “HOUSE”. After that search the Find result panel looks like this:

        Imgur

        Right-click in the white area of the Find result panel and choose Find in this finder… from the menu that pops up. Input “WHITE” in the Find what box and press the Find all button. At this point a SECOND Find result panel tab will show with some new results:

        Imgur

        Right-click in the white area of this newest Find result panel and choose Find in this finder… from the menu that pops up. Input “GREEN” in the Find what box and press the Find all button. This gives the THIRD and final result:

        Imgur

        Unfortunately, the caption of the Find result panel always indicates “3 hits”. It seems like it should change to “2 hits” for the second search and “1 hit” for the third search. However, the blue/purple line in the output for each search shows the correct number of hits in the correct number of files, so in practical terms it is okay.

        If this (or ANY posting on the Notepad++ Community site) is useful, don’t reply with a “thanks”, simply up-vote ( click the ^ in the ^ 0 v area on the right ).

        1 Reply Last reply Reply Quote 0
        • S
          Scott Sumner
          last edited by Aug 15, 2017, 6:38 PM

          A key point that I missed–but it worked anyway because it is the default option–is to check the Search only in found lines checkbox in the two Find in finder searches above. Otherwise, ALL LINES of the files hit in the prior searches get examined in subsequent searches, instead of only the lines that were hit earlier.

          Imgur

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