dupe: ignores "-" ?

Discussion related to "Everything" 1.5.
NotNull
Posts: 5977
Joined: Wed May 24, 2017 9:22 pm

dupe: ignores "-" ?

Post by NotNull »

Test setup:

Code: Select all

T:\TEST>dir /b
#abc.test
$abc.test
%abc.test
'abc.test
(abc.test
)abc.test
+abc.test
-abc-.test
-abc.test
@abc.test
abc-.test
[abc.test
]abc.test
_abc.test
`abc.test
{abc.test
}abc.test
~abc.test



T:\TEST>es.exe  t:\test\ dupe:name
T:\TEST\'abc.test
T:\TEST\-abc-.test
T:\TEST\-abc.test
T:\TEST\abc-.test

Same goes for dupe:path (using a different setup)
Same goes for unique:
void
Developer
Posts: 20041
Joined: Fri Oct 16, 2009 11:31 pm

Re: dupe: ignores "-" ?

Post by void »

Everything finds duplicates using its built-in natural sort.

The Everything natural sort:
  • ignores case
  • ignores
    -
    and
    '
  • normalizes text
  • removes diacritics
  • treats digit sequences as numbers
If you want to find duplicates using Unicode code point values instead of the natural sort, prefix your dupe: search with the case: modifier.

For example:

case:dupe:
therube
Posts: 5753
Joined: Thu Sep 03, 2009 6:48 pm

Re: dupe: ignores "-" ?

Post by therube »

NotNull
Posts: 5977
Joined: Wed May 24, 2017 9:22 pm

Re: dupe: ignores "-" ?

Post by NotNull »

@void, therube: Thanks for the explanations. Will keep that in mind.

One question remains:
void wrote: Sat Jul 11, 2026 11:07 pm The Everything natural sort:
[...]
treats digit sequences as numbers
What is the underlying mechanism when numbers are involved?
For example for 00001.test and 01.test.
void
Developer
Posts: 20041
Joined: Fri Oct 16, 2009 11:31 pm

Re: dupe: ignores "-" ?

Post by void »

Basically, it's regex:\d+

00001 is the same as 01
Both are treated as the number 1
However, if the numbers are the same, Everything will then check the number of leading zeroes.
More leading zeroes are shown first.

000 < 00
00001 < 01

So while 00001 and 01 are the same number, they still compare differently because of the extra leading zeroes.
NotNull
Posts: 5977
Joined: Wed May 24, 2017 9:22 pm

Re: dupe: ignores "-" ?

Post by NotNull »

All clear. No more questions, your honor ;)