files-community / Files

Building the best file manager for Windows
https://files.community
MIT License
34.08k stars 2.17k forks source link

Feature: Convert regex to AQS in search bar #9711

Open eduardo-toptal opened 2 years ago

eduardo-toptal commented 2 years ago

What's the Problem?

Search queries can be even more powerful leveraging regular expressions. Instead of the clunky Windows Query Syntax we could move from

.exe OR .pdf 
to
\.exe|\.pdf

and queries like

path/to/*/something

Solution/Idea

Add a checkbox to choose between windows default and regexp. Also allow making regexp the standard.

Alternatives

None

Priorities

No response

Files Version

2.3.6.0

Windows Version

Windows 10 Pro 21H2

Comments

No response

ELowry commented 1 year ago

A good option for this, used in many code languages, is to treat an input surrounded by / characters as a regular expression.

For example:

Note

It may be useful to either change the color of the search input or add a small "regex" tag to the end of it when this type of string is detected, so the user can clearly understand what they are doing. As an example, here is how VS Code displays the difference: image

yaira2 commented 9 months ago

Is there anything else besides these operators? OR to | AND to + NOT to -