how to use "OR" condition(for group) in everything regex

General discussion related to "Everything".
slarkmonk
Posts: 6
Joined: Mon Aug 26, 2024 1:50 am

how to use "OR" condition(for group) in everything regex

Post by slarkmonk »

Forexmple,i want searth files which name contain "ctp" and end with .md or .txt,bellow command is work fine
ctp ext:md;txt

but,when i want to use regex do the same thing,wierd things happen.I have tried much regex command,but it just don't work.Maybe in everything the () and [] have diffrent mechanism with other place???
bellow is commands i have tried and failed

ctp regex:(.md$|.txt$)

ctp regex:\.(md|txt)$

regex:.*ctp.*\.(md|txt)$

regex:.*ctp.*\.(md\|txt)$

so,i'm really want to know how use "group or" in everything regex.

thanks
void
Developer
Posts: 20020
Joined: Fri Oct 16, 2009 11:31 pm

Re: how to use "OR" condition(for group) in everything regex

Post by void »

Everything 1.4:

Please try:

ctp regex:"(.md$|.txt$)"


(The
|
must be escaped with double quotes)



For Everything 1.5,
ctp regex:(.md$|.txt$)
will work as expected, regex: will eat the |.
slarkmonk
Posts: 6
Joined: Mon Aug 26, 2024 1:50 am

Re: how to use "OR" condition(for group) in everything regex

Post by slarkmonk »

void wrote: Tue Jun 16, 2026 6:52 am Everything 1.4:

Please try:

ctp regex:"(.md$|.txt$)"


(The
|
must be escaped with double quotes)



For Everything 1.5,
ctp regex:(.md$|.txt$)
will work as expected, regex: will eat the |.
thank you very much!
It worked! :D