5

I want to use Everything to search a specific folder on an external drive for files with filenames ending in an underscore and number, such as in the below examples:

  • _01
  • _1
  • _10

I want to do this for the purpose of weeding out files that I know for certain to be duplicates without spending hours in a duplicate file finding program sifting through tens of thousands of results.

I'm using Everything because the duplicate file finder I was using - dupeGuru - doesn't seem to allow searching for files based on this parameter alone, or at least doesn't do it simply.

I've come up with the following regex:

(_\d)+$

...but it doesn't work when I input it into Everything, even when regex is enabled in its settings, which tells me that either my regex is wrong or Everything uses them very differently.

How can I use regular expressions with Everything?

Hashim Aziz
  • 13,835

2 Answers2

3

First, just let me say, I am not a regex guru, so I cannot tell you if you're absolutely wrong. ;-)

That said, though $ is supported, it appears that dropping the $ to just (_\d)+ works fine, so it does appear to be at least wrong for Everything. Other simple patterns without $ seemed to work well enough.

How can I use regular expressions with Everything?

If you simply want to use regex, enable it under the Search menu.

But assuming you want to also search a specific directory, you should leave "Enable Regex" off (you may want to toggle Match Path as well) and use e.g.:

C:\path\to\files regex:(_\d)+

Not using this format seems to fail searches where Regex is enabled and a specific path is listed (for likely obvious reasons).

You should also have "Everything" marked in Search because alternately, if you don't have "Everything" marked, Everything may not return everything (whew!).

For example, if you have "Documents" marked, Everything will recognize items with standard file suffixes e.g text_example_01.txt but not items with non-standard suffixes e.g text_example._01 or text_example_01 (no suffix).

Anaksunaman
  • 18,227
2
(_\d)+$

matches

_\d$
_\d_\d$
_\d_\d_\d$

etc.

I think you want

_(\d)+$

or more simply (if you don't need references)

_\d+$

which matches

_\d$
_\d\d$
_\d\d\d$

etc.

You may also want to try replacing \d with [0-9] in case \d is not implemented in Everything