Rule conditions

Conditions are PCRE regular expressions applied to the body of a message or to one of its headers. A condition works if it is possible to apply its expression to the specified part of the message. The check is case-insensitive. If you don't want to study the syntax of regular expressions, enter your expressions as text from messages, digits and spaces. The condition will be met if the text from an expression is a substring of the selected part of message.

Here are several examples of expressions:

·          "foo bar"
The expression is matched if the text contains the substring "foo bar".

·          "foo\s+bar"
The same as above, but there may be one or more spaces between foo and bar.
"^foo"
The expression is matched if the text starts from "foo".

·          "bar$"
The expression is matched if the text ends with "bar".

·          "^foo bar$"
The expression is is matched if the text is equal to "foo bar".

 

You can read more about regular expressions in The Bat! manual.

A condition can be marked as Strong. In this case, the rule will be applied if that condition is true no matter whether other conditions of the rule are true.

The negation flag (the Not operation) is applied to a condition if you select the corresponding checkbox.