Option to ignore forbidden characters in the search string

Have a suggestion for "Everything"? Please post it here.
Post Reply
Raindrops
Posts: 247
Joined: Sat Jan 21, 2023 10:04 am

Option to ignore forbidden characters in the search string

Post by Raindrops »

A common use scenario is that the user copies some text from internet and pastes it in Everything to check if he already has that file.

But often the string has some forbidden characters (: < > " \ / ? * |).
Naturally the user does not intend to look for these characters in his HDDs.
But since he has included such characters in the search, Everything looks for these characters and ignores all potential matches.

It would be great if Everything can simply ignore these characters and search for the rest.

This facility is already there in Windows indexing.
void
Developer
Posts: 16669
Joined: Fri Oct 16, 2009 11:31 pm

Re: Option to ignore forbidden characters in the search string

Post by void »

While these characters are invalid in filenames, Everything does use them as operators.

In Everything 1.5 you'll be able to use Ctrl + Shift + V to paste without punctuation.

Thank you for the suggestion.
Raindrops
Posts: 247
Joined: Sat Jan 21, 2023 10:04 am

Re: Option to ignore forbidden characters in the search string

Post by Raindrops »

Thanks for that prompt reply!

I tried SHFT+CTRL+V and it works just fine.

The most-often encountered symbol is colon (:).
Typically, in a research paper title, the colon is used to separate the main title and the subtitle.

SHFT+CTRL+V is able to clean this up.
Raindrops
Posts: 247
Joined: Sat Jan 21, 2023 10:04 am

Re: Option to ignore forbidden characters in the search string

Post by Raindrops »

I found that 1.5 Alpha has a setting called "Ignore punctuation" in this path:
Tools > Options > General > Home

I changed it to "Enabled", and then checked this feature out by pasting a text string that represents a file that I already have in my HDD, but which contained a colon (:) between the title and subtitle.

But Everything failed to find the file.
I manually deleted the colon and then Everything found the file.

So the question is, how does this option work?
void
Developer
Posts: 16669
Joined: Fri Oct 16, 2009 11:31 pm

Re: Option to ignore forbidden characters in the search string

Post by void »

Everything ignores punctuation in the filename, not your search.

For example, searching for:

spiderman

will match the following filename:

spider-man



Punctuation is important in Everything.
If you search for:

-

Everything will match files containing

-



I'll have an option in the next alpha update to ignore punctuation when pasting text in the search box.
For now, please use: Ctrl + Shift + V
Raindrops
Posts: 247
Joined: Sat Jan 21, 2023 10:04 am

Re: Option to ignore forbidden characters in the search string

Post by Raindrops »

Thanks for the clarification!

From your description, IMHO this check box should be labelled "include results with additional punctuation"
Similarly, there is another check box in the same screen, which should be labeled "include results with additional white spaces"

Many thanks for adding the "ignore punctuation" feature in the next alpha!
Surely looking forward to it.
Although this is not missed much because the SHFT+CTRL+V hotkey is also not bad for muscle memory, and it also allows us to search for a precise string by using the CTRL+V hotkey. So we already have the best of both worlds! :)
void
Developer
Posts: 16669
Joined: Fri Oct 16, 2009 11:31 pm

Re: Option to ignore forbidden characters in the search string

Post by void »

Everything 1.5.0.1336a adds a search_edit_paste_format ini setting.

To automatically replace punctuation with spaces when pasting text in the search box:
  • Copy and paste the following into your Everything search box:
    /search_edit_paste_format=[regex-replace:[regex-replace:$newtext:,"[`~!@#$%^&*()\-=_+{}|\[\]\\;':,./<>?\x22\x00-\x1f]"," "]," +"," "]
  • Press ENTER in your Everything search box.
Note: I'm using nested #regex-replace:<> calls here to replace multiple consecutive spaces with a single space.



To restore the defaults and allow any pasted text:
  • Copy and paste the following into your Everything search box:
    /search_edit_paste_format=
  • Press ENTER in your Everything search box.
Note: Changing the search_edit_paste_format makes it very difficult to paste this command.
Use Alt + Up/Down from the search box to select the previous /search_edit_paste_format command and adjust from there.
Raindrops
Posts: 247
Joined: Sat Jan 21, 2023 10:04 am

Re: Option to ignore forbidden characters in the search string

Post by Raindrops »

These are not good solutions!

First of all, how will a user discover these strings?
He has to feel this need and come in search of this solution to this thread.
That will not happen for most users.

Secondly, even if he remembers that there is such a solution, he will have to remember long strings and enter them verbatim.
Or he has to store them somewhere and copy-paste them whenever needed.

This is not practical at all.

Instead, the GUI should provide a directly accessible control.
void
Developer
Posts: 16669
Joined: Fri Oct 16, 2009 11:31 pm

Re: Option to ignore forbidden characters in the search string

Post by void »

Thank you for the feedback Raindrops,

I will consider a simple "ignore punctuation when pasting in the search box" UI option.

For now, search_edit_paste_format will give the user full control over rewriting the pasted text.
Post Reply