Reference: Filter operators

Filter expressions in targeting filters can match strings or regular expressions. The following table describes the supported filter operators as they appear when you use a sensor in a targeting filter for a collection.

For more information, see Filter operators.

Table 1. Filter operators

Filter operator

Usage

contains

The sensor value contains the specified string.

Example: running processes contains "chrome"

does not contain

The sensor value does not contain the specified string.

starts with

The sensor value starts with the specified string.

Example: starts with "chrome"

When the filter is evaluated, the expression is translated to a regular expression using the matches operator.

does not start with

The sensor value does not start with the specified string.

ends with

The sensor value ends with the specified string.

Example: ends with "chrome.exe"

When the filter is evaluated, the expression is translated to a regular expression using the matches operator.

does not end with

The sensor value does not end with the specified string.

matches

The sensor value matches the specified regular expression.

For sensors in the get clause of a question, use the matches operator to match any value in a list. For example, the following question matches the user names root or reboot:

Get Last Logged In User matches (root|reboot) from all machines

In the from clause of a question, you can also use the in operator to match values in a list.

does not match

The sensor value does not match the specified regular expression.

in (from clause only)

The sensor value is equal to one of the specified strings. Enclose the values in parentheses and use commas as separators.

is equal to

The sensor value is equal to the specified value or string.

is not equal to

The sensor value is not equal to the specified value or string.

is less than

The sensor value is less than the specified value.

is less than or equal to

The sensor value is less than or equal to the specified string.

is greater than

The sensor value is greater than the specified value.

is greater than or equal to

The sensor value is greater than or equal to the specified string.