Re: How to match single wild character in Foxtrot Query? [message #1430 is a reply to message #1429] |
Tue, 03 May 2022 09:13   |
FoxTrot Engineering
Messages: 417 Registered: April 2020
|
Senior Member |
|
|
If you don't use [includes the exact string], the "-" character is either considered as a word separator (like space and most punctuation), or either means [does not contain word / quoted string] when preceded by a space or other punctuation, and immediately followed by an alphabetic, numeric or symbol character, or by a quoted string (").
Thus, you don't need "a bunch of OR's", but a single one: [multipolar | "multi polar"] will also find multi-polar.
We could enhance FoxTrot's syntax so a ? character inside a word would mean "any single alphabetic or numeric or symbol character", or maybe "any single alphabetic or numeric or symbol character, or no character", but that would not allow finding either a single word, or two distinct consecutive words.
As for regular expressions, they support the | for alternatives, e.g. [`(foo|multi[ -]?polar|bar)`] will find any of: [foo], [multipolar], [multi-polar], [multi polar], [bar]
Jérôme - FoxTrot Engineering
|
|
|