0

It seems that there is no way to search file content using regex by spotlight. Is it so? Thanks.

https://developer.apple.com/library/archive/documentation/Carbon/Conceptual/SpotlightQuery/Concepts/QueryFormat.html

4
  • 1
    Please see this and this and see if it answers your questions.
    – Roxiun
    Commented May 30, 2020 at 10:54
  • As you suspect from the Apple documentation, general regular expressions are not supported in Spotlight queries. See the linked duplicate question for possible approaches and work arounds. Commented May 30, 2020 at 11:04
  • Please answer yes or no. These posts were so old and don't provide a clear answer of yes or no. At least I don't see the answers there were conclusive. My takehome message were no. Commented May 30, 2020 at 11:05
  • A yes or no answer requires agreeing a definition of regular expression. The term regular expression is often conflated with Perl Compatible Regular Expressions (PCRE). In the Apple documentation you linked to, Spotlights own form of regular expression is defined and it comes no-where close to the power or scope of PCRE. Does this help? Commented May 30, 2020 at 11:09

0

Browse other questions tagged .