FoxTrot Search Forum
FoxTrot Search for macOS Forum

Home » Public Forums » FoxTrot Search User Forum » How to match single wild character in Foxtrot Query?
Re: How to match single wild character in Foxtrot Query? [message #1432 is a reply to message #1430] Sun, 08 May 2022 22:36 Go to previous messageGo to previous message
Atlas
Messages: 150
Registered: August 2009
Senior Member
I think there is a pattern of miscommunication here that hopefully I can address. I wanted to respond earlier, but the forum was down.

1. The point of suggesting a syntax for single character wild card is that we don't have to string together OR's. You're right that I can search for the three possibilities with [multipolar | "multi polar"] instead of [multipolar | "multi polar" | multi-polar], but that's just a difference in degree and users still have to write long searching string with OR in it to express something like simple like [multi?polar]. Maybe the best we have now is to use OR statements, but I'm wondering if we can make it better.


2. I think you're mis-understanding me when I said "no character". Clearly, if ? means "no character" then it wouldn't find "multi polar". I'm not trying to give the full engineering spec of how "?" should behave, and we can think through it together on how to spec its behavior. IF (I understand these syntax changes will take work) you are open to adding a "?" syntax, then perhaps it could mean "any alphanumeric, symbol, space, or no character". Look, I'm not an engineer, so I'm sure you can find some ways to make it more exact, and I'm just trying to illustrate some possible ways to tackle the issue. Another possibility is to take inspiration from regex syntax, wher "?" could mean something like ".", but I think "." is not interpreted as "no character". If you're open to discussing alternative ways to implement "?", then let me know. IF you want me to give you an engineering spec, then I'm open to that as well, but we will need to open up a workflow via email or elsewhere.


3. When using "Matches the Foxtrot query", we can only use an OR logic WITHIN the regex (which you've noted), but users cannot use the OR logic to COMBINE regex with other Foxtrot expressions. This is in the Foxtrot Query documentation, which I've tested: note that a regular expression may contain the | alternation operator, but you can’t combine a regular expression with another one, or with another FoxTrot query expression, with the boolean | operator. Thus, bob `(smith|doe)` is a valid FoxTrot query, but bob `smith.*` | `doe.*` or bob | `smith.*` are not valid.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Problem with search—No index selected
Next Topic: Highlighting text, adding notes to PDFs in the FoxTrot preview
Goto Forum:
  


Current Time: Mon May 12 04:35:30 GMT+2 2025