Using wildcards in content search?

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
PeterPanino
Posts: 78
Joined: Sun Feb 21, 2016 10:26 pm

Using wildcards in content search?

Post by PeterPanino »

Why I cannot use wildcards in my content search, for example:

Code: Select all

*.pas C:\delphi\ dm:last2years content:T*Create
This would be supposed to find in *.pas files:

Code: Select all

TformBrowsers.Create
Or does this require a special setting?
therube
Posts: 4955
Joined: Thu Sep 03, 2009 6:48 pm

Re: Using wildcards in content search?

Post by therube »

content: does not accept wildcards
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Using wildcards in content search?

Post by NotNull »

... unless ...

you use regulr expressions:

Code: Select all

*.pas    C:\delphi\   dm:last2years    regex:content:"t.*create"
Notes:
- Everything uses case-insensitive matching
- you can omit the ""; I use them for clarity.
PeterPanino
Posts: 78
Joined: Sun Feb 21, 2016 10:26 pm

Re: Using wildcards in content search?

Post by PeterPanino »

NotNull wrote: Wed Mar 18, 2020 3:29 pm ... unless ...

you use regulr expressions:

Code: Select all

*.pas    C:\delphi\   dm:last2years    regex:content:"t.*create"
Notes:
- Everything uses case-insensitive matching
- you can omit the ""; I use them for clarity.
Thanks, that worked. It would be much better if there was a separate regex-search-content edit-field so we wouldn't have to write "regex:content:" each time we have to search content. That would be very useful!

BTW, does anybody know how to increase the font in the search field?
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Using wildcards in content search?

Post by NotNull »

PeterPanino wrote: Wed Mar 18, 2020 4:00 pm BTW, does anybody know how to increase the font in the search field?
When Everything is not running, you can change this setting in Everything.ini:

Code: Select all

search_edit_font_size=14
(14 is just an example; I use 15. Partly because it is better readable when posting screenshots here; partly because complex regular expressions are easier to read with a larger font size)

Everything.ini can be found in %APPDATA%\Everything or else in the folder where your Everything.exe is.
PeterPanino
Posts: 78
Joined: Sun Feb 21, 2016 10:26 pm

Re: Using wildcards in content search?

Post by PeterPanino »

NotNull wrote: Wed Mar 18, 2020 4:10 pm
PeterPanino wrote: Wed Mar 18, 2020 4:00 pm BTW, does anybody know how to increase the font in the search field?
When Everything is not running, you can change this setting in Everything.ini:

Code: Select all

search_edit_font_size=14
(14 is just an example; I use 15. Partly because it is better readable when posting screenshots here; partly because complex regular expressions are easier to read with a larger font size)

Everything.ini can be found in %APPDATA%\Everything or else in the folder where your Everything.exe is.
Thank you very much!
therube
Posts: 4955
Joined: Thu Sep 03, 2009 6:48 pm

Re: Using wildcards in content search?

Post by therube »

(I did try that, before.
But I didn't really think it through.

As I already had, content:int*int written out, I appended regex: to the content:, so content:regex: (which does not work), rather then prefixing it, regex:content: (which does work).)
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Using wildcards in content search?

Post by NotNull »

I had a little help from this thread (had it bookmarked (if that is a valid verb?))
void
Developer
Posts: 16672
Joined: Fri Oct 16, 2009 11:31 pm

Re: Using wildcards in content search?

Post by void »

To enable wildcards with the content: search function please try the wildcards: search modifier:
*.pas C:\delphi\ dm:last2years wildcards:content:*T*Create*

-Note: wildcards match the entire content, surround your search with * and *, or try searching for:

*.pas C:\delphi\ dm:last2years noexact:wildcards:content:T*Create

Everything disables wildcards by default when using the content: search function because usually the user is trying to find a literal *.

To create a filter to simplify this for future searches:
  • In Everything, from the Search menu, click Add to filters....
  • Change the Name to: Wildcard Content
  • Change the Search to: noexact:wildcards:content:search:
  • Change the Macro to: wildcontent<search>
Now when you search for wildcontent:T*Create it is replaced with noexact:wildcards:content:T*Create
froggie
Posts: 300
Joined: Wed Jun 12, 2013 10:43 pm

Re: Using wildcards in content search?

Post by froggie »

@void
Isn't "noexact" the same as "nowfn" and is the default? Why would you need to specify it in the macro, other than clarity in the example?
void
Developer
Posts: 16672
Joined: Fri Oct 16, 2009 11:31 pm

Re: Using wildcards in content search?

Post by void »

noexact: is the same as nowfn: (nowholefilename:)

The setting Tools -> Options -> Search -> Match whole filename when using wildcards controls the default setting when wildcards are used (even when applied to the content: search).

Future versions of Everything will not use the "Match whole filename when using wildcards" setting when the wildcards: search modifier is specified, the default will be match anywhere in the content and you will need to specify the exact: search modifier to match the entire content.
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Using wildcards in content search?

Post by NotNull »

void wrote: Thu Mar 19, 2020 5:21 am To enable wildcards with the content: search function please try the wildcards: search modifier:
*.pas C:\delphi\ dm:last2years wildcards:content:*T*Create*
:shock: And just when you start to think that you are getting some grip on all the Everything possibilities, a new one pops up around the corner! How deep *is* this rabbithole? :)
Post Reply