How do i exclude "commas" from search results?

General discussion related to "Everything".
Post Reply
rohithkumarsp
Posts: 4
Joined: Sat Oct 09, 2021 6:50 pm

How do i exclude "commas" from search results?

Post by rohithkumarsp »

I really hate the app doesn't recognize the file if it has a comma in the file, if i have a file named "apple , mango" it WILL not show up results if i search "apple , mango" but will show results if i type them without the comma, its frustrating, is there anyway to either get the app working with commas or to exclude commas?
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: How do i exclude "commas" from search results?

Post by NotNull »

Searching for one of the following should report your "apple, mango" file:

Code: Select all

"apple, mango"
apple, mango
apple , mango
Make sure you have no search modifiers (Match .. , Enable Regex) enabled under the Search menu entry.
Mizufluffy
Posts: 62
Joined: Sun Jun 13, 2021 10:22 am

Re: How do i exclude "commas" from search results?

Post by Mizufluffy »

Here is a simple example. I created a few files with similar names.

Code: Select all

apple , mango.fruits
apple mango.fruits
apple, mango.fruits
apple,mango.fruits
In the image below I had three different searches going:

Code: Select all

apple mango
apple , mango
"apple , mango"
The first one has no comma and can find all files because they all have 'apple' and 'mango' in their name. The second one can find those that have 'apple', ',' and 'mango' in their name but not the one without comma. The third can only find the one with exact phrase where comma has a space on both sides.
2021-10-10 01_49_08-Window.jpg
2021-10-10 01_49_08-Window.jpg (193.16 KiB) Viewed 11138 times
rohithkumarsp
Posts: 4
Joined: Sat Oct 09, 2021 6:50 pm

Re: How do i exclude "commas" from search results?

Post by rohithkumarsp »

NotNull wrote: Sat Oct 09, 2021 7:56 pm Make sure you have no search modifiers (Match .. , Enable Regex) enabled under the Search menu entry.
hmm, today i tried again, for the first time in years it worked, then i saw the search settings, it did have regex off, so i don't know if it was enabled all these days or how it was turned off today but it seems to be working fine now, thanks
rohithkumarsp
Posts: 4
Joined: Sat Oct 09, 2021 6:50 pm

Re: How do i exclude "commas" from search results?

Post by rohithkumarsp »

ok, while commas do ineed work, i still need an exclude option, for example Apple + Mango, it just wouldn't show results unless i remove the + symbol
void
Developer
Posts: 16680
Joined: Fri Oct 16, 2009 11:31 pm

Re: How do i exclude "commas" from search results?

Post by void »

Everything will match what you search for.
That is, if you search for a comma, Everything will find files containing a comma in their filename.


Are you pasting the search into Everything?
-If so, please use Ctrl + Shift + V to paste without punctuation.



Are you typing the comma?
-If so, please skip typing the comma.


Please note:
a space in Everything means AND. (abc 123 == abc AND 123)
Use double quotes to escape spaces. ( "abc 123" == literal abc 123 )



Are you trying to find apple <an optional comma> mango? (to match apple mango OR apple, mango)

You would need regex for this, please try the following search:
regex:"apple *,? *mango"

regex: = enable regular expressions.
apple = match literal text: apple
<space>* = match a space any number of times.
,? = match a , (if it exists)
<space>* = match a space any number of times.
mango = match literal text: mango
Mizufluffy
Posts: 62
Joined: Sun Jun 13, 2021 10:22 am

Re: How do i exclude "commas" from search results?

Post by Mizufluffy »

rohithkumarsp wrote: Wed Oct 13, 2021 5:18 pm ok, while commas do ineed work, i still need an exclude option, for example Apple + Mango, it just wouldn't show results unless i remove the + symbol
It's a little bit hard for me to understand what kind of file names you are expecting to find. Do you have any actual full file names you could show as an example? Do you have a + symbol in the file names you are searching for?
For example, if I have these file names with "apple" and "mango" in their name:

Code: Select all

apple , mango.fruits
apple + mango - Copy.fruits
apple + mango.fruits
apple mango.fruits
apple, mango.fruits
apple,mango.fruits
lots of apple + mango.fruits
lots of bananas + mango and apple.fruits
and I search for

Code: Select all

apple + mango
(notice: no double quotes!)
then I can find these as a result:

Code: Select all

apple + mango - Copy.fruits
apple + mango.fruits
lots of apple + mango.fruits
lots of bananas + mango and apple.fruits
As void already explained, a space means AND operator (unless it's escaped using double quotes) so the search finds all results that include all three search terms (apple, +, mango) in any order.
If I had double quotes:

Code: Select all

"apple + mango"
then I would find these file names

Code: Select all

apple + mango - Copy.fruits
apple + mango.fruits
lots of apple + mango.fruits
As you can see, one of the results is missing compared to when not using double quotes.

Just to confirm, by exclude option what do you want to exclude from the results?
Exclusion operator is ! so continuing from my above searches if I'd want to exclude all file names that contain a + sign but have both apple and mango in their name, I could type

Code: Select all

apple !+ mango
and I'd get these file names:

Code: Select all

apple , mango.fruits
apple mango.fruits
apple, mango.fruits
apple,mango.fruits
If I wanted to exclude a comma then I could do this:

Code: Select all

apple !, mango
and get these results:

Code: Select all

apple + mango - Copy.fruits
apple + mango.fruits
apple mango.fruits
lots of apple + mango.fruits
lots of bananas + mango and apple.fruits
In a similar fashion you could for example exclude apple or mango:

Code: Select all

!apple mango

Code: Select all

apple !mango
Edit:
I decided to expand a little bit more on the topic...

If you wanted to find files that only contain apple or mango but not both at the same time you could do this:

Code: Select all

<apple !mango> | <!apple mango>
Here's explanation:
< > are grouping symbols.
a space is AND operator, it basically means when this AND that are true
! is NOT operator, it basically reverses the meaning so if "mango" means find a mango then "!mango" means do NOT find mango
| symbol is OR operator, it basically means find this OR that
In the first group on the left we are finding file names that contains apple but does not contain mango. In the second group we are finding file names that do not contain apple but contains mango. Then we sum these groups together with OR operator as "find these group 1 results OR these group 2 results".

Now you might ask why not simply do

Code: Select all

apple | mango
This is because it's not exclusive or operator. This would find all results with only apple, only mango or both of them. However, we could do

Code: Select all

<apple | mango> !<apple mango>
to get the same result as with

Code: Select all

<apple !mango> | <!apple mango>
because we simply exclude the results where both apple and mango exists in the file name.

Speaking of which, XOR operator could be a nice addition. It's something that's not a must have but it certainly could make some searches look a lot more simple with apple XOR mango searches instead of having to expand them. Not that I have really needed them myself yet...
rohithkumarsp
Posts: 4
Joined: Sat Oct 09, 2021 6:50 pm

Re: How do i exclude "commas" from search results?

Post by rohithkumarsp »

my problem is when i want to copy search a result that has + in it, the app doesn't show results unless i remove +

now for the commas, here's my problem

Code: Select all

File name Apple, Mango and Orange
if i search

Code: Select all

Apple, Mango and Orange = Results show up

Apple, Mango , and Orange = Results show up

Apple , Mango , and Orange = Results show up

Apple, Mango, and Orange = Results DOESN'T show up

Apple, Mango, Orange = Results DOESN'T show up

Apple , Mango , Orange = Results show up
see how inconsistent the symbols are while searching?

so this is the same issue as the + symbol, i just want to exclude commas or symbols while searching so i get a result
therube
Posts: 4955
Joined: Thu Sep 03, 2009 6:48 pm

Re: How do i exclude "commas" from search results?

Post by therube »

when i want to copy search a result that has + in it, the app doesn't show results unless i remove +
Copy from where?
If from outside of Everything:
Are you pasting the search into Everything?
-If so, please use Ctrl + Shift + V to paste without punctuation.
Mizufluffy
Posts: 62
Joined: Sun Jun 13, 2021 10:22 am

Re: How do i exclude "commas" from search results?

Post by Mizufluffy »

rohithkumarsp wrote: Fri Oct 15, 2021 1:59 pm

Code: Select all

File name Apple, Mango and Orange
if i search

Code: Select all

Apple, Mango, and Orange = Results DOESN'T show up

Apple, Mango, Orange = Results DOESN'T show up
see how inconsistent the symbols are while searching?

so this is the same issue as the + symbol, i just want to exclude commas or symbols while searching so i get a result
This is because those two have word

Code: Select all

Mango,
instead of word

Code: Select all

Mango
and your file name had following words:

Code: Select all

Apple,

Code: Select all

Mango

Code: Select all

and

Code: Select all

Orange
So, if you search for

Code: Select all

Apple, Mango and Orange
Apple, Mango , and Orange
Apple , Mango , and Orange
None of those have word "Mango," (with the comma). When you separate the commas with spaces then Everything understands a space as AND operator. So, for example, this

Code: Select all

Apple, Mango and Orange
equals the following search:
Apple, AND Mango AND and AND Orange
but this one

Code: Select all

Apple, Mango, and Orange
equals the following search:
Apple, AND Mango, AND and AND Orange

In other words, they are trying to find file names that have all of those separate search terms. Unless you are trying to find the exact file name (and using double quotes) then you don't need to use comma multiple times. For example, you could find your file with the following search:

Code: Select all

, orange mango apple
(notice the comma at the beginning and the word order is different than in your file name!)

Here's an example:
2021-10-15 18_38_25-, orange mango apple - Everything (1.5a) 1.5.0.1280a (x64).jpg
2021-10-15 18_38_25-, orange mango apple - Everything (1.5a) 1.5.0.1280a (x64).jpg (64.22 KiB) Viewed 10405 times
So, in conclusion, both of those searches that failed for you were caused by a comma immediately following Mango ("Mango,") because your file didn't have "Mango," in the file name.
void
Developer
Posts: 16680
Joined: Fri Oct 16, 2009 11:31 pm

Re: How do i exclude "commas" from search results?

Post by void »

Please try the Everything 1.5 alpha and use Ctrl + Shift + V to paste without punctuation.
Post Reply