Search filenames with WordA within 10 characters of WordB

General discussion related to "Everything".
Post Reply
thumperstrauss
Posts: 1
Joined: Thu Nov 17, 2022 7:44 pm

Search filenames with WordA within 10 characters of WordB

Post by thumperstrauss »

I have filenames written in different ways, such as:
  • Monthly Report January.pdf
  • Monthly Division Report January.pdf
  • Monthly Sales Dept. Report January.pdf
How does one so an Advanced Search or Regex search to look for Monthly within, say, 10 characters of another Report? Or even Monthly appearing anywhere in the same filename as Report?

I looked through some of the guides and forum posts, but couldn't immediately find the answer.
void
Developer
Posts: 16753
Joined: Fri Oct 16, 2009 11:31 pm

Re: Search filenames with WordA within 10 characters of WordB

Post by void »

Please try the following regex search:

regex:monthly.{0,10}report

regex: = enable regular expressions.
. = match any character.
{min,max} = match the previous element min-max times

In this case match monthly, any character 0-10 times, and then match report in the same filename.
Post Reply