Problem about regex

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
hakusa
Posts: 18
Joined: Mon Dec 23, 2019 4:50 pm

Problem about regex

Post by hakusa »

When regex is disabled I type fire -

The result as you can see even folder name 2016 Ken Navarro - Bonfire 2016 is listed.

https://ibb.co/cLPFjwG

When regex is enabled I type fire -

https://ibb.co/02rXJCF

Which shows the actual folder/file names contains fire -
But when regex is enabled I type *.mp3 and it shows nothing.

I was using tool called Locate32 that similar to Everything and as you can see below there wasn't such issue. How can I use Everything in the same way like Locate32 do?

https://ibb.co/MGF5vYh

https://ibb.co/CJDYmXF
Last edited by therube on Tue Dec 24, 2019 12:29 pm, edited 1 time in total.
Reason: image embed codes were wrong, so i removed them, making them click links
void
Developer
Posts: 16684
Joined: Fri Oct 16, 2009 11:31 pm

Re: Problem about regex

Post by void »

Are you confusing regex with wildcards?

*.mp3 is not valid regex.

Everything supports wildcards when regex is disabled.

Please leave regex disabled and try searching for: *.mp3
hakusa
Posts: 18
Joined: Mon Dec 23, 2019 4:50 pm

Re: Problem about regex

Post by hakusa »

void wrote: Mon Dec 23, 2019 7:15 pm Are you confusing regex with wildcards?

*.mp3 is not valid regex.

Please leave regex disabled and try searching for: *.mp3

But when regex disabled if I type for example fire - then every folder/file names contains fire and - symbol listed. And It makes result list very long.
Like:
1983 China Crisis - Working With Fire And Steel
What it should show only such files:
Jungle Fire - Jambu
Omar Faruk Tekbilek 1994 - Gypsy Fire - 320
So I can see exactly what I'm typing.
With tool Locate32 I could use .mp3 and fire - examples together without switch off/on regex.
void
Developer
Posts: 16684
Joined: Fri Oct 16, 2009 11:31 pm

Re: Problem about regex

Post by void »

Please try enabling match whole words from the Search menu.

You can search for fire AND *.mp3 with the following search:
fire *.mp3
hakusa
Posts: 18
Joined: Mon Dec 23, 2019 4:50 pm

Re: Problem about regex

Post by hakusa »

void wrote: Mon Dec 23, 2019 8:06 pm Please try enabling match whole words from the Search menu.

You can search for fire AND *.mp3 with the following search:
fire *.mp3
I see my screenshots can't be shown. Instead of my screenshots only text IMAGE. I don't want combine 2 searches in 1.
I'll try to explain again:

When regex is disabled I type fire -

Picture:
https://ibb.co/cLPFjwG

The result as you can see even folder name 2016 Ken Navarro - Bonfire 2016 is listed. A long long list with cluttered results. Actually we have already AND OR commands for this.

When regex is enabled I type fire - and see the results of exactly what I typed (and wanted)
Picture:
https://ibb.co/02rXJCF
But this time .mp3 doesn't work though .mp3 is a regex.

With Locate32 I don't have to switch on/off regex but get the results as shown on the pictures below:
https://ibb.co/MGF5vYh
https://ibb.co/CJDYmXF

Can Everything work in the same way so no bloated results because of - symbol and also we can search using asterisk.
froggie
Posts: 300
Joined: Wed Jun 12, 2013 10:43 pm

Re: Problem about regex

Post by froggie »

Why *.mp3? Just .mp3 seems to have the same matches and it is much faster.
void
Developer
Posts: 16684
Joined: Fri Oct 16, 2009 11:31 pm

Re: Problem about regex

Post by void »

Please use double quotes to escape spaces:
"fire - "

This should give you the same results you see in Locate32.

Combine with *.mp3:
"fire - " *.mp3
hakusa
Posts: 18
Joined: Mon Dec 23, 2019 4:50 pm

Re: Problem about regex

Post by hakusa »

void wrote: Mon Dec 23, 2019 8:51 pm Please use double quotes to escape spaces:
"fire - "

This should give you the same results you see in Locate32.

Combine with *.mp3:
"fire - " *.mp3
But each time putting " " around search term is tiring and also forgettable. Could you add an option like Locate32 do. It combines see the results exactly what we type plus use asterisk for searching quickly extensions and searching file/folder names without switching regexp option.
void
Developer
Posts: 16684
Joined: Fri Oct 16, 2009 11:31 pm

Re: Problem about regex

Post by void »

To make Everything always search for literal text:
  • In Everything, from the Search menu, click Organize search filters....
  • Select the Everything filter and click Edit....
  • Change the Search to:
    "search:"
    (include the double quotes)
  • Change the Macro to:
    everything<search>
  • Click OK.
  • Click OK.
When the Everything filter is active, your searches will be treated as literal searches.

You may wish to search for:
fire - *.mp3

This will only match files starting with fire.

I recommend disabling match whole filename when using wildcards:
  • In Everything, from the Tools menu, click Options.
  • Click Search on the left.
  • Uncheck Match whole filename when using wildcards.
  • Click OK.
Now, fire - *.mp3 will match anywhere in the filename.
hakusa
Posts: 18
Joined: Mon Dec 23, 2019 4:50 pm

Re: Problem about regex

Post by hakusa »

void wrote: Mon Dec 23, 2019 9:18 pm To make Everything always search for literal text:
  • In Everything, from the Search menu, click Organize search filters....
  • Select the Everything filter and click Edit....
  • Change the Search to:
    "search:"
    (include the double quotes)
  • Change the Macro to:
    everything<search>
  • Click OK.
  • Click OK.
When the Everything filter is active, your searches will be treated as literal searches.

You may wish to search for:
fire - *.mp3

This will only match files starting with fire.

I recommend disabling match whole filename when using wildcards:
  • In Everything, from the Tools menu, click Options.
  • Click Search on the left.
  • Uncheck Match whole filename when using wildcards.
  • Click OK.
Now, fire - *.mp3 will match anywhere in the filename.
Thank you very much. I didn't have any hope but seems Everything much flexible and sophisticated than I thought.
hakusa
Posts: 18
Joined: Mon Dec 23, 2019 4:50 pm

Re: Problem about regex

Post by hakusa »

Hi,I tried to apply same search method to Folder and File filters but neither worked.

Code: Select all

"folder:"
<search>

Code: Select all

"folder:"
<folder>

Code: Select all

"file:"
<file>

Code: Select all

"file:"
<search>
void
Developer
Posts: 16684
Joined: Fri Oct 16, 2009 11:31 pm

Re: Problem about regex

Post by void »

For folders only, please try the following search:

folder:"search:"


with the following macro:

foldersearch<search>


For files only, please try the following search:

file:"search:"


with the following macro:

foldersearch<search>
hakusa
Posts: 18
Joined: Mon Dec 23, 2019 4:50 pm

Re: Problem about regex

Post by hakusa »

Thank you, it worked.
Post Reply