Skip to content

Operators

This page lists every operator the feat engine supports, grouped by the type of value it compares.

Operators are used in:

Every operator works on the same shape: (attribute path) (operator) (values array). The engine coerces the attribute value to the type the operator expects; if it cannot, the condition does not match and evaluation moves on.

OperatorMeaning
is_one_ofThe attribute equals at least one value in the array.
is_not_one_ofThe attribute does not equal any value in the array.
is_emptyThe attribute is missing, null, or an empty string.
is_not_emptyThe attribute is present and non-empty.
containsThe attribute string contains at least one of the values as a substring.
does_not_containThe attribute does not contain any of the values.
starts_withThe attribute starts with at least one of the values.
ends_withThe attribute ends with at least one of the values.
matches_regexThe attribute matches at least one regex in the values array.

Regex syntax follows the host SDK’s engine (JavaScript regex in the TS SDKs, Go’s regexp package in Go, re in Python, Ruby’s Regexp). For consistency across SDKs, stick to PCRE-style patterns and avoid engine-specific features.

OperatorMeaning
gtGreater than.
gteGreater than or equal.
ltLess than.
lteLess than or equal.

The attribute is coerced to a number. Strings that do not parse as numbers do not match.

OperatorMeaning
beforeThe attribute is before the supplied date.
afterThe attribute is after the supplied date.

The attribute and the supplied value must both be ISO-8601 dates (2026-06-05 or 2026-06-05T10:30:00Z). Unparseable values do not match.

For string attributes formatted as semantic versions (4.2.1, 1.0.0-beta.3):

OperatorMeaning
semver_eqEqual.
semver_gtGreater than.
semver_gteGreater than or equal.
semver_ltLess than.
semver_lteLess than or equal.

Useful for “this feature requires app version 4.2 or later.” The semver comparison follows semver.org.

OperatorMeaning
segment_matchThe context is in at least one of the listed segments.
segment_not_matchThe context is in none of the listed segments.

values is a list of segment keys. The engine evaluates the segment’s rules with the same context. Segment rules can themselves reference other segments; cycles are forbidden by the dashboard. See Segments.

These operators are only available when the segments organization feature is on. See Organization features.

When an operator takes a values array of length more than one:

  • For positive operators (is_one_of, contains, starts_with, ends_with, matches_regex, before, after, gt and friends, semver), the condition matches if the attribute matches any value.
  • For negative operators (is_not_one_of, does_not_contain, segment_not_match), the condition matches if the attribute matches none of the values.

Inside a condition group, conditions are AND’d; across groups, OR’d. The operator’s multi-value semantics is independent of that.

If the context does not carry the attribute the condition references, the condition does not match and the rule is skipped. Evaluation moves to the next rule. This is the safe default for anonymous contexts and partially-populated contexts.