此内容没有您所选择的语言版本。

17.6. Operator Reference


Binary operators

The binary operators for simple language predicates are shown in Table 17.2, “Binary Operators for the Simple Language”.
Expand
Table 17.2. Binary Operators for the Simple Language
OperatorDescription
==Equals.
>Greater than.
>=Greater than or equals.
<Less than.
<=Less than or equals.
!=Not equal to.
containsTest if LHS string contains RHS string.
not containsTest if LHS string does not contain RHS string.
regexTest if LHS string matches RHS regular expression.
not regexTest if LHS string does not match RHS regular expression.
inTest if LHS string appears in the RHS comma-separated list.
not inTest if LHS string does not appear in the RHS comma-separated list.
isTest if LHS is an instance of RHS Java type (using Java instanceof operator).
not isTest if LHS is not an instance of RHS Java type (using Java instanceof operator).
rangeTest if LHS number lies in the RHS range (where range has the format, 'min...max').
not rangeTest if LHS number does not lie in the RHS range (where range has the format, 'min...max').

Unary operators

The binary operators for simple language predicates are shown in Table 17.3, “Unary Operators for the Simple Language”.
Expand
Table 17.3. Unary Operators for the Simple Language
OperatorDescription
++Increment a number by 1.
--Decrement a number by 1.
\Escape the following character. Note the following special cases: \n for new line, \t for tab, and \r for carriage return.

Combining predicates

The conjunctions shown in Table 17.4, “Conjunctions for Simple Language Predicates” can be used to combine two or more simple language predicates.
Expand
Table 17.4. Conjunctions for Simple Language Predicates
OperatorDescription
&&Combine two predicates with logical and.
||Combine two predicates with logical inclusive or.
andDeprecated. Use && instead.
orDeprecated. Use || instead.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat