How to search only the start of a word

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

How to search only the start of a word

Postby yusuke » Sun Dec 10, 2017 3:33 am

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: 83
Joined: Thu Oct 27, 2016 7:19 pm

Re: How to search only the start of a word

Postby ovg » Sun Dec 10, 2017 5:58 am

Try search:

When Search->Enable Regex is disabled

Code: Select all

regex:^for

When Search->Enable Regex is enabled

Code: Select all

^for

void
Site Admin
Posts: 3646
Joined: Fri Oct 16, 2009 11:31 pm

Re: How to search only the start of a word

Postby void » Sun Dec 10, 2017 9:42 am

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

Postby WanderMax » Thu Jan 18, 2018 12:01 pm

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: 11
Joined: Thu Jul 13, 2017 9:14 am

Re: How to search only the start of a word

Postby tuska » Thu Jan 18, 2018 12:57 pm

Code: Select all

nosubfolders:F:\Backup files:regex:^f

should do this.

Stamimail
Posts: 418
Joined: Sat Aug 31, 2013 9:05 pm

Re: How to search only the start of a word

Postby Stamimail » Thu Jan 18, 2018 1:04 pm

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

Postby WanderMax » Thu Jan 18, 2018 1:13 pm

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: 11
Joined: Thu Jul 13, 2017 9:14 am

Re: How to search only the start of a word

Postby tuska » Thu Jan 18, 2018 1:51 pm

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/everything/searching/#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: 418
Joined: Sat Aug 31, 2013 9:05 pm

Re: How to search only the start of a word

Postby Stamimail » Thu Jan 18, 2018 2:23 pm

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: 1763
Joined: Thu Sep 03, 2009 6:48 pm

Re: How to search only the start of a word

Postby therube » Thu Jan 18, 2018 3:55 pm

Enable Regex

Code: Select all

F:\\Backup\\.*\\f.*

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

Re: How to search only the start of a word

Postby NotNull » Thu Jan 18, 2018 5:05 pm

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

Postby WanderMax » Fri Jan 19, 2018 12:27 pm

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: 11
Joined: Thu Jul 13, 2017 9:14 am

Re: How to search only the start of a word

Postby tuska » Fri Jan 19, 2018 7:46 pm

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


Return to “General”