How to search for filenames with wildcards AND trailing spaces?

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
juzzle
Posts: 24
Joined: Sat Apr 11, 2020 1:07 am

How to search for filenames with wildcards AND trailing spaces?

Post by juzzle »

I am a bit puzzled by this chanllenge.

Consider these files:

Code: Select all

House front 123.jpg
Houseboat 456.jpg
Housers 789.jpg
From the above I only want to find filenames starting with "House" followed by a space, ie:

Code: Select all

House front 123.jpg
I've tried "House *" (noting the space), but it doesn't seem to honour the space
I've tried the Whole Words option, but still finds all the above

I see mention of "Ignore Punctuation" in old threads, but I want include punctuation.

What am I doing wrong?
void
Developer
Posts: 16678
Joined: Fri Oct 16, 2009 11:31 pm

Re: How to search for filenames with wildcards AND trailing spaces?

Post by void »

Sounds like you have regex enabled.

Please try disabling regex from the Search menu and please try searching for:
"House *"


With regex enabled, "house *" means house following by any number of spaces.

Regex
juzzle
Posts: 24
Joined: Sat Apr 11, 2020 1:07 am

Re: How to search for filenames with wildcards AND trailing spaces?

Post by juzzle »

Thanks for the quick reply! But no, Regex is disabled.

I should also point out that I am using pipes to separate multiple criteria, eg

Code: Select all

House *|Farm *|Car *  
(noting again the space after the word)
void
Developer
Posts: 16678
Joined: Fri Oct 16, 2009 11:31 pm

Re: How to search for filenames with wildcards AND trailing spaces?

Post by void »

OR operations are done first, please try quoting or < > grouping, please try searching for:

"house *"|"farm *"|"car *"
-or-
<House *>|<Farm *>|<Car *>

Without grouping or quotes, Everything is seeing this query as: House AND (* OR Farm) AND (* OR Car) AND *

Alternatively, change your operator precedence to AND > OR:
  • In Everything, from the Tools menu, click Options.
  • Click the Search tab on the left.
  • Change Operator precedence to AND > OR.
  • Click OK.
  • Search for: House *|Farm *|Car *
juzzle
Posts: 24
Joined: Sat Apr 11, 2020 1:07 am

Re: How to search for filenames with wildcards AND trailing spaces?

Post by juzzle »

Curiously, the "<" grouping method did not work, however, the double quotes method worked a treat!

Thank you so much
void
Developer
Posts: 16678
Joined: Fri Oct 16, 2009 11:31 pm

Re: How to search for filenames with wildcards AND trailing spaces?

Post by void »

The < > grouping method will not match the space.

Use double quotes to match spaces.
juzzle
Posts: 24
Joined: Sat Apr 11, 2020 1:07 am

Re: How to search for filenames with wildcards AND trailing spaces?

Post by juzzle »

Thanks again
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Re: How to search for filenames with wildcards AND trailing spaces?

Post by raccoon »

Maybe worth noting here, the OR priority can be changed in settings. I personally prefer the AND priority grouping as it seems more intuitive.

Tools > Options > General > Search > Operator precedence: "AND > OR"
Post Reply