Details
Filter Grammar - Operators
The grammar operators are used to construct expressions that can be evaluated to true or false (for filtering) or to an integer or float value (for sorting) or to a vector (for counting). There are some specific constraints and behavior associated with the sets variable which is unique in that it is a vector of strings (all the sets of which the view is a member) :
| Operator | Notes | Use with sets (vector of string) |
| - | strings comparison : True if LHS contains RHS. Use 'string' as shorthand for filename ~ 'string' | Returns a second vector of strings – all the strings in LHS that contain RHS. The returned vector can be evaluated as Bool (true if it has at least one string) or used as a new vector of strings. |
| in | float within range: True if LHS is within the range specified by RHS. | N/A |
| and | ||
| or | ||
| not | ||
| < | Natural sort for strings. | Natural sort for strings. |
| <= | ||
| > | ||
| >= | ||
| = | True if the vector of strings contains at least one element that exactly matches the supplied string. Cannot be used to compare two vectors for equality. | |
| != | True if at least one element of the vector does not exactly match the supplied string. This is not the same as not(sets = 'string'). | |
| ( ) | Precedence |