Wildcards don't work exactly as specified

Found a bug in "Everything"? report it here
Post Reply
Kylotan
Posts: 1
Joined: Sun Mar 29, 2015 1:15 pm

Wildcards don't work exactly as specified

Post by Kylotan »

If I search for "SD2*.map", it will not match "SD2 GM Kit.map", even though clearly this wildcard pattern is correct for that file.

If I change it to "*SD2*.map", it will successfully match "SD2 GM Kit.map" now, but also a bunch of other files that I didn't want in the search.

Is it known that wildcards don't work in the middle if there isn't one at the start as well? Are there plans to fix this?

Using version 1.3.4.686.
void
Developer
Posts: 15367
Joined: Fri Oct 16, 2009 11:31 pm

Re: Wildcards don't work exactly as specified

Post by void »

Please try disabling Match Path from the Search menu.

Wildcards match the whole filename, or the whole full path and filename if match path is enabled.

With match path enabled, SD2*.map will not match C:\Some Directory\SD2 GM Kit.map

-or-

Disable match whole filename when using wildcards in Tools -> Options -> Search.
brauchmasdoch
Posts: 3
Joined: Wed May 27, 2015 9:50 pm

Re: Wildcards don't work exactly as specified

Post by brauchmasdoch »

Hi!

I have tried different options as mentioned in the previous post, but I can't figure out what Everything is doing for the love of it.

How can I find all files starting with "abc". If I enter "abc" I get those files and all that contain it anywhere. If I enter "abc*" I get MORE results, as a matter of fact, thousands of files and directories that DO NOT have "abc" in their file or pathname at all!!! :?

If I enter "*abc*" I do not get any results. :shock:

What am I missing?
salazor
Posts: 258
Joined: Tue Jun 17, 2014 10:52 am

Re: Wildcards don't work exactly as specified

Post by salazor »

brauchmasdoch wrote:
How can I find all files starting with "abc".
Turn on regex and use:

Code: Select all

^abc.*


OR - Off regex

Code: Select all

regex:^abc.*
And read this and click on the menu - Help - "Search Syntax" you will find more.
brauchmasdoch
Posts: 3
Joined: Wed May 27, 2015 9:50 pm

Re: Wildcards don't work exactly as specified

Post by brauchmasdoch »

Thanks, salazor!
I did read that syntax page, but that is exactly what brought me here since it is not working as it should.

It says a space is an "AND" operator. It is not. Try any two sequences with a space or "AND" - it doesn't work.
For example you have thousands of pics on your disc in the from of "PICTxxxxx.jpg". If I enter "pict", they all show up, also if I enter "ict" with even more results. if I now enter "00" to display all the ones with two zeros in it all results disappear. No files are listed ever. Actually all results disappear on entering the space - it doesn't treat space as an operator and I don't know what else could be "AND".

It also doesn't treat the asterisk as a wildcard since "ict*00" should be a workaround for the not working "AND"/space. But again, it doesn*t work and kind of ignores the asterisk.
My results show all files with "ict00", but not for example "ict400" or "ict12300".
Interestingly and oddly I get also this file: "opr0IC53.tmp". It has the "t" missing, yet it was found. This is so messed up to what I know (not regex). I wish there was a helpfile or some documentation that is correct.
therube
Posts: 4610
Joined: Thu Sep 03, 2009 6:48 pm

Re: Wildcards don't work exactly as specified

Post by therube »

> It says a space is an "AND" operator

That will not apply when you're using regex:
(Most everything changes when you're using regex:.)

> It also doesn't treat the asterisk as a wildcard since "ict*00"

Likewise.
(.) & (*) mean something different when using regex:

If you want to find "pict" and "00", using regex:
> regex:pict.*00
That means find "pict", any character (.), any number of times (*) AND "00".
So that will find "pict0018.mov" & "pictures from italy 007.jpg".
brauchmasdoch
Posts: 3
Joined: Wed May 27, 2015 9:50 pm

Re: Wildcards don't work exactly as specified

Post by brauchmasdoch »

Thanks, with regex it actually works, but only if I write "regex:" in the search line. Activating it in settings does not seem to do anything.

Is there also a way to do it with the non-regex syntax?
Any recommendation for a good regex-guide? The ones I found so far assume too much knowledge - what you did there with the explanation of . and * was the clearest I have found so far and all I need!
void
Developer
Posts: 15367
Joined: Fri Oct 16, 2009 11:31 pm

Re: Wildcards don't work exactly as specified

Post by void »

I think you might have Regex and match path enabled.

Please make sure Match Case is disabled from the Search menu.
Please make sure Match Whole Word is disabled from the Search menu.
Please make sure Match Path is disabled from the Search menu.
Please make sure Match Diacritics is disabled from the Search menu.
Please make sure Regex is disabled from the Search menu.

With the above search options disabled, try searching for:

Code: Select all

abc*
If Match Path is enabled, the full path and filename must start with abc, in which case it will most likely return no files.
For example, with match path enabled:
c:\folder1\folder2\abctest.file
does not start with abc.

* will match any number of characters.
However, when regex is enabled it will match the previous element zero or more times.

For basic regex syntax, please see:
http://en.wikipedia.org/wiki/Regex

Hope this helps.
Alduin's Khajiit
Posts: 22
Joined: Mon Dec 02, 2013 1:48 pm

Re: Wildcards don't work exactly as specified

Post by Alduin's Khajiit »

I AM HAVING THE *SAME* PROBLEM BUT *NONE* OF THESE FIXES WORKED!!! * IS STILL *NOT* ACTING AS A WILDCARD!!!!!!a
void
Developer
Posts: 15367
Joined: Fri Oct 16, 2009 11:31 pm

Re: Wildcards don't work exactly as specified

Post by void »

Please don't abuse the report feature.

In Everything, please press Ctrl + ~ to show the debug console.

Please type in a wildcard search you are having trouble with.
What is displayed in the debug console after you have typed in the wildcard search?

It should look something like:

Code: Select all

term 00000000, flags: 0000, next: 00000000, notnext: 00000000
folderop: 123, fileop: 123, term: ABC
Post Reply