• Login
Community
  • Login

Bug in "Find In Files" filter of Notepad++ 8.2.1 (x64)

Scheduled Pinned Locked Moved General Discussion
8 Posts 3 Posters 1.3k 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.
  • C
    CWallner
    last edited by Feb 3, 2022, 8:32 AM

    Found a bug in the “Find in Files” filter, when searching for files that contain blanks in the file name, e.g.
    SAP 7.70*.xml
    The search results in 0 files found…
    Search “7” (0 hits in 0 files of 0 searched)

    When I instead then search for SAP*.xml it properly finds files:
    Search “7” (13 hits in 12 files of 13 searched)

    but in this case unfortunately the hits also contain results from SAP 7.60*.xml (which should not be contained in the search, e.g.).
    C:\UEMConfig\T\general\FlexRepository\Shortcut\SAP 7.60 Netweaver - SAPLogon.xml (1 hit)
    C:\UEMConfig\T\general\FlexRepository\Shortcut\SAP 7.70 Netweaver - Analysis for Microsoft Excel.xml (1 hit)

    What I originally wanted to do is replace 7.60 by 7.70 in all SAP 7.70*.xml files, whis is impossible with the current Notepad++ 8.2.1 version (cross checked with the 8.2.2 rc5 release that the issue is still present in the most recent developer release)

    A P 2 Replies Last reply Feb 3, 2022, 12:57 PM Reply Quote 2
    • A
      Alan Kilborn @CWallner
      last edited by Alan Kilborn Feb 3, 2022, 12:58 PM Feb 3, 2022, 12:57 PM

      @cwallner

      I suppose it is a “bug” although I call it a “limitation”. :-)

      It’s a limitation because a space is used as a delimiter in the Filters box, e.g., *.txt *.log <-- see the space between?

      The best you may be able to do is replace any spaces with ?, e.g. SAP?7.70*.xml in your case.

      1 Reply Last reply Reply Quote 4
      • P
        PeterJones @CWallner
        last edited by Feb 3, 2022, 2:11 PM

        @cwallner said in Bug in "Find In Files" filter of Notepad++ 8.2.1 (x64):

        Found a bug in the “Find in Files” filter, when searching for files that contain blanks in the file name,

        Interesting timing. Just a few days ago, this was talked about in NPP issue#11086 , where the developer confirmed that it was the intended behavior (that is, not a bug). To handle spaces in filenames in the Filters entry field, you need to use wildcards instead of the space characters.

        That discussion was propagated to the User Manual repository as usermanual issue#311 , and I have added verbiage to the User Manual to the effect of:

        Find in Files

        …

        • Wildcards can include * for zero or more of any character, and ? for exactly one of any character.
        • Most characters work as literals. However, space is used as the separator, and thus cannot be used as a literal in your filter. Some punctuation characters have special meanings (like the ? and * wildcards, or the ! exclusion or !+\ for recursive exclusion), and cannot be used as literals. Also, the ; causes problems, so even though Microsoft allows it in file and path names, using a ; in the Filters box will not work as you might hope. If you want to match a space or a semicolon ; or other problematic-punctuation in your file or folder for your Filter (whether for inclusion or exclusion), then use the * and/or ? wildcards instead. (So x?y.txt will match the file x;y.txt or x y.txt (with a space between x and y).)

        This new wording will be in the next release of npp-user-manual.org ’s Searching > Find in Files section.

        C A 2 Replies Last reply Feb 3, 2022, 11:35 PM Reply Quote 3
        • C
          CWallner @PeterJones
          last edited by Feb 3, 2022, 11:35 PM

          @PeterJones
          if separation of multiple filters is the intended behavior for blanks in the filter, why not allow double quotes for search strings that should contain blanks in the file name. Double quotes are not allowed for file names in neither unix nor Windows file systems whereas blanks or single quotes are…
          when I used “SAP 7.70*.xml” it also did not return a proper result…

          1 Reply Last reply Reply Quote 0
          • A
            Alan Kilborn @PeterJones
            last edited by Feb 4, 2022, 2:55 AM

            @peterjones

            Probably should add a note to the manual to the effect that double quotes don’t work in the applicable Find window boxes…

            C 1 Reply Last reply Feb 4, 2022, 8:26 AM Reply Quote 2
            • C
              CWallner @Alan Kilborn
              last edited by Feb 4, 2022, 8:26 AM

              @alan-kilborn
              Would it be fine to raise a feature request for the filters field then, to allow using double quotes to mask any search criteria containing blanks? Double quotes are more or less common standard for this kind of masking blanks in searches or actions (even google search allows double quotes for this case, so they are not only being used for file system related actions in OS)…

              A 1 Reply Last reply Feb 4, 2022, 12:49 PM Reply Quote 1
              • A
                Alan Kilborn @CWallner
                last edited by Feb 4, 2022, 12:49 PM

                @cwallner said in Bug in "Find In Files" filter of Notepad++ 8.2.1 (x64):

                Would it be fine to raise a feature request for the filters field then,

                Sure, you can ask for anything you’d like in a feature request.
                You do that by following the advice HERE.

                C 1 Reply Last reply Feb 8, 2022, 3:25 PM Reply Quote 3
                • C
                  CWallner @Alan Kilborn
                  last edited by Feb 8, 2022, 3:25 PM

                  have opened a new issue on github
                  https://github.com/notepad-plus-plus/notepad-plus-plus/issues/11155

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