Mixture of Regex & Boolean Operators

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
armsys
Posts: 557
Joined: 10 Mar 2012 12:40
Location: Hong Kong

Mixture of Regex & Boolean Operators

Post by armsys »

Is it true that regex and Boolean operators can't be mixed together in Find Files?
My test result shows it impossible:
>sci.*am & ! path:tutor

But, Don's sample pattern inspires such illusion.
To see the attached files, you need to log into the forum.

admin
Site Admin
Posts: 66631
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Mixture of Regex & Boolean Operators

Post by admin »

Yes, it's true.

Indeed, my sample pattern inspired such illusion. Sorry for that.

That "Master Invert" looks like Boolean mode, but internally it is not. It is processed before deciding whether the term is Boolean or RegExp or whatever.

admin
Site Admin
Posts: 66631
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Mixture of Regex & Boolean Operators

Post by admin »

armsys wrote:Is it true that regex and Boolean operators can't be mixed together in Find Files?
Correction: It *is* possible! It's even in the Help file. However, the examples in the Help are slightly wrong AND there is a bug in the current version. :ninja:

Here is an updated version:

Code: Select all

XYplorer supports Boolean RegExp, i.e. you may combine any number of Regular Expressions with Boolean operators. The RegExps must be quoted in that case and each RegExp needs to be prefixed with ">", e.g.:
  :>"\d{4}-\d{1,2}-\d{1,2}" AND "*.doc"
  :>"\d{4}-\d{1,2}-\d{1,2}" AND >"\.doc$"
This will work in the next beta.

Post Reply