Regex (enable disable) & Dopus

Discussion related to "Everything" 1.5.
Post Reply
jackao
Posts: 11
Joined: Mon Dec 30, 2024 11:31 pm

Regex (enable disable) & Dopus

Post by jackao »

1.
If I check regex from search menu, does it mean I add "regex: " in front of my search actually, just invisible?

2.
In the demo of everything (Help > Search Syntax> Examples), there is no space between "regex:" and "content:".
Did it take content:^foo as a value of regex:?
To add another value to regex just use ";" like ext:exe;dll?

"regex:content:^foo Search for files where the content starts with foo."

3.
If a third party program say Dopus is using Everything. The program will neglect the setting of (Options> General> Home) or not?
Say I have enable regex and search path, does it apply to Dopus automatically as well?

4.
Can macro and regex use at the same time?
Will it result different to input regex: or enable regex from the search menu?
Dopus allow everything to have regex enable or disable by default similar to enable from search menu in everything itself

currently
macro + regex: work
macro + regex(by default/search menu) + noregex not work

5.
How to use noregex: ? I couldn't get this work in either everything itself or everything in dopus.


Sorry for too many questions
void
Developer
Posts: 19870
Joined: Fri Oct 16, 2009 11:31 pm

Re: Regex (enable disable) & Dopus

Post by void »

If I check regex from search menu, does it mean I add "regex: " in front of my search actually, just invisible?
Basically, yes.

Enabling regex from the search menu is slightly different to regex:

Search menu regex:

The entire search is treated as literal regex.
You cannot use Everything search syntax or Everything search functions.
See below for options to change this behavior.

regex:
Only the search term prefixed with regex: will use regex.
For example:
regex:^abc 123$

Only regex is applied to ^abc
123$ will be a normal Everything search without regex.
regex: can be used on search functions, like content:

regex*:
This will treat the rest of the search as a literal regex search. (same as enabling regex from the search menu)
For example:
size:>10mb regex*:^abc 123$

(greater than 10mb, with the regex search:
^abc 123$
-the space is treated literally)

In the demo of everything (Help > Search Syntax> Examples), there is no space between "regex:" and "content:".
Did it take content:^foo as a value of regex:?
To add another value to regex just use ";" like ext:exe;dll?

"regex:content:^foo Search for files where the content starts with foo."
A space means AND in Everything.
A space would break your search term, so regex: MUST occur immediately before your search function / search term without a space.


Code: Select all

regex:content:^foo
\____/\______/\__/
   |      |     └ the search text
   |      └ the search function
   └ the search modifier
regex:
is a search modifier.
Search modifiers can be applied to search terms (and search functions).

Search modifiers must appear before the search term.
content:regex:^foo
will not perform a regex search, it will look for the literal content:
regex:^foo


content:
is a search function.
regex:content:^foo
means search file content with the regex search of
^foo
(starting with foo)

The
content:^foo
is not treated as a literal regex search.
This can be done with regex:"content:^foo"


If a third party program say Dopus is using Everything. The program will neglect the setting of (Options> General> Home) or not?
Dopus uses Everything IPC.
Everything IPC has its own regex setting which Dopus will supply.
The Search menu settings are ignored.
The Options -> Home settings are ignored.


Say I have enable regex and search path, does it apply to Dopus automatically as well?
No.


Can macro and regex use at the same time?
Will it result different to input regex: or enable regex from the search menu?
macros cannot be used when regex is enabled from the search menu.
macros can be used with the regex: search modifier.


Dopus allow everything to have regex enable or disable by default similar to enable from search menu in everything itself
currently
macro + regex: work
macro + regex(by default/search menu) + noregex not work
This is expected, enabling regex by default will treat your macros as literal regex search text.

-There is a workaround, please try disabling pure_regex:
  • In Everything 1.5, from the Tools menu, click Options.
  • Click the Advanced tab on the left.
  • To the right of Show settings containing, search for:
    regex
  • Select: pure_regex
  • Set the value to: false
  • Click OK.
When disabled, IPC regex, and the search menu regex will no longer treat the entire search as literal regex and instead applies the regex: modifier to every search term by default.
When disabled, you can use macros, Everything search operators (space == AND) and Everything search functions.

Think of it this way:
pure_regex enabled:
^abc 123$
=> regex:"^abc 123$"
(all the search text is treated as literal regex search text)

pure_regex disabled:
size:>10mb ^abc 123$
=>
regex:size:>10mb
AND
regex:^abc
AND
regex:123$

size: ignores regex: and the space is used as the AND operator instead of a literal space

pure_regex


How to use noregex: ? I couldn't get this work in either everything itself or everything in dopus.
Cannot be used if regex is enabled by default (with pure regex)
noregex: would be treated as literal search text.
Post Reply