FoxTrot Search Forum
FoxTrot Search for macOS Forum

Home » Public Forums » FoxTrot Search User Forum » Is there a limit to how long regex expression can be?
Is there a limit to how long regex expression can be? [message #1417] Sun, 24 April 2022 12:21 Go to next message
Atlas
Messages: 130
Registered: August 2009
Senior Member
I have a list of files and folders that I want to filter for, and I usually search for them by using regex expressions to filter by path name. For example, I might search for something with a logic like "files with the characters 9000 or 8000 or 7000 in the file path". Of course, I have a long list of files and folders that I want to search for so the regex can grow very long.

Is there a known limit on how long a regex expression can be for Foxtrot? I understand I could also achieve the same effect by creating a separate Foxtrot database instead of filtering by path names, but it's not possible for me to programmatically add new files to a Foxtrot database, whereas I can programmatically add files to an ordinary database like MySQL, query against it, and generate a regex from its outputs.

I understand this is a niche problem that few experience, so even a simple "yes" or "no" answer would be very helpful for me. Thank you for your considerations.

[Updated on: Sun, 24 April 2022 12:21]

Report message to a moderator

Re: Is there a limit to how long regex expression can be? [message #1418 is a reply to message #1417] Mon, 25 April 2022 08:52 Go to previous message
FoxTrot Engineering
Messages: 384
Registered: April 2020
Senior Member
I don't think there is an arbitrary limit on the length of a regular expression in FoxTrot itself. The regular expression engine we use, PCRE2, has some limits, but "they will never in practice be relevant". See pcre2limits.

Jérôme - FoxTrot Engineering
Previous Topic: How to exclude folders from search results
Next Topic: Please clarify what's the meaning of the "Ignore" settings
Goto Forum:
  


Current Time: Tue Apr 16 18:53:23 GMT+2 2024