How to search only the start of a word

General discussion related to "Everything".
Post Reply
yusuke
Posts: 1
Joined: Sun Dec 10, 2017 3:21 am

How to search only the start of a word

Post by yusuke »

Hi, I need to search and get the results of files starting with the search term, not the ones that contain it.

Example:

If I search the term : "for"

Id like to only get: forensics, ford, forest, etc. But NOT get files named like: perFORmance, beFORe, etc.


How can I accomplish that?


BTW this program is INSANE! I can't believe Microsoft didn't acquire it yet. So superior, man.
ovg
Posts: 294
Joined: Thu Oct 27, 2016 7:19 pm

Re: How to search only the start of a word

Post by ovg »

Try search:

When Search->Enable Regex is disabled

Code: Select all

regex:^for

When Search->Enable Regex is enabled

Code: Select all

^for
void
Developer
Posts: 16747
Joined: Fri Oct 16, 2009 11:31 pm

Re: How to search only the start of a word

Post by void »

A couple other ways:

Using the startwith: search function
startwith:for

Using wildcards:
for*

Regex syntax.
WanderMax
Posts: 29
Joined: Thu Jan 10, 2013 4:31 pm

Re: How to search only the start of a word

Post by WanderMax »

void wrote:A couple other ways:

Using the startwith: search function
startwith:for

Using wildcards:
for*

Regex syntax.
void,
another question that, if I want to search files startwith f in folder F:\Backup, could I use the with Regex on:

Code: Select all

F:\Backup  f*
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: How to search only the start of a word

Post by tuska »

Code: Select all

nosubfolders:F:\Backup files:regex:^f
should do this.
Stamimail
Posts: 1122
Joined: Sat Aug 31, 2013 9:05 pm

Re: How to search only the start of a word

Post by Stamimail »

If I understand the question correctly, the question is:
How to define a path when Regex (Ctrl+R) is enabled.
WanderMax
Posts: 29
Joined: Thu Jan 10, 2013 4:31 pm

Re: How to search only the start of a word

Post by WanderMax »

Stamimail wrote:If I understand the question correctly, the question is:
How to define a path when Regex (Ctrl+R) is enabled.
Yes, I want to search files in the specified path using Regex method.
However, when I add path in the search box in front, it shows no results.
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: How to search only the start of a word

Post by tuska »

WanderMax wrote:Yes, I want to search files in the specified path using Regex method.
However, when I add path in the search box in front, it shows no results.
I suppose, that this is not possible this way.
http://www.voidtools.com/support/everyt ... ing/#regex
Regex overrides the search syntax. Search operators, wildcards, macros, modifiers and functions do not work in regex mode.
Modifiers (e.g. regex:, parent:, etc.) can be specified in the input line --> parent:F:\Backup files:regex:^f,
however, if RegEx is permanent selected, then in my opinion no [other] modifiers are allowed.
Stamimail
Posts: 1122
Joined: Sat Aug 31, 2013 9:05 pm

Re: How to search only the start of a word

Post by Stamimail »

These things leading me to wonder why is "Enbale Regex" is taking place in the menu?
It's for advanced users, and better to be used as modifier (regex:)
therube
Posts: 4977
Joined: Thu Sep 03, 2009 6:48 pm

Re: How to search only the start of a word

Post by therube »

Enable Regex

Code: Select all

F:\\Backup\\.*\\f.*
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: How to search only the start of a word

Post by NotNull »

WanderMax wrote: Yes, I want to search files in the specified path using Regex method.
However, when I add path in the search box in front, it shows no results.
If you *must*, you can come close with this regular expression:

Code: Select all

f:\\backup\\f([^\\])*$
Subtitles:
search for f:\backup\f , followed by any character, as long as it's not a "\" (that would mean that it hits a subdirectory)
The $ is to mark theend of the file, to make sure there is no more "\" anywhere in the complete c:\long\path\file.name

Note that this will also find folder-names starting with an "f" if they are located directly under f:\backup.
Note2: In Everything regex is case INsensitive (unless yoiu enable "match case")


But the suggested solutions are way easier to accomplish what you want, like:

Code: Select all

file:  infolder:f:\backup  f* 
WanderMax
Posts: 29
Joined: Thu Jan 10, 2013 4:31 pm

Re: How to search only the start of a word

Post by WanderMax »

Thanks for the replies above.
In fact, I want to search files that start with 'F' in the folder F:\Backup and its subfolders.
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: How to search only the start of a word

Post by tuska »

WanderMax wrote:In fact, I want to search files that start with 'F' in the folder F:\Backup and its subfolders.
After trial and error of the above arises for me the following (RegEx enabled):

Code: Select all

F:\\Backup\\f([^\\])*$|F:\\Backup\\.*\\f.*
Don't ask me anything(!) ... I will try to understand it later. :roll:

Without RegEx enabled:

Code: Select all

F:\Backup\* files:regex:^f
Attention: "Match Path" (Strg + U) must not be activated!

Regards
Karl
Post Reply