Changes and Additions to Equality Operators

The following table defines the additions and changes to HMR equality operators introduced with this feature.

Unlike the Boolean operators the ampersand (&) and the pipe (|), you can use the following equality operators in conjunction with string operators. For example, a header-value with its comparison-type set to boolean, can have this match-value evaluated: “($rule1.$elem1.$0 + $rule1.$elem2.@1) == $rule2.$0”. Equality operators can also be uses with Boolean operators, as in this example: ($rule1.$0 == $rule2.$1) & $rue3.

Equality operators always evaluate to either true or false.

Equality Operator Symbol Short Description Detailed Information
== String case sensitive quality operator Performs a character-by-character, case-sensitive string comparison on both the left side and the right side of the operator.
~= String case insensitive quality operator Performs a character-by-character, case-insensitive string comparison on both the left side and the right side of the operator.
!= String case sensitive not equal to equality operator Performs a character-by-character, case-sensitive string comparison on both the left side and the right side of the operator, returning true if the left side is equal to or less than the right side of the operator.
>= Greater than or equal to operator Performs a string-to-integer conversion. If the string-to-integer comparison fails, the value is treated as 0. After the conversion, the operator will compare the two values and return true only if the left side is greater than or equal to the right side of the operator.
< Less than operator Performs a string-to-integer conversion. If the string-to-integer conversion fails, the value is treated as 0. After the conversion, the operator will compare the two values and return true only if the left side is less than the right side of the operator.
> Greater than operator Performs a string-to-integer conversion. If the string-to-integer conversion fails, the value is treated as 0. After the conversion, the operator will compare the two values and return true only if the left side is greater than the right side of the operator.