diff --git a/FAQ.md b/FAQ.md index 04ff3c3b36..24ff0683b3 100644 --- a/FAQ.md +++ b/FAQ.md @@ -2705,6 +2705,7 @@ The following rule conditions are available: All the conditions of a rule need to be true for the rule action to be executed. All conditions are optional, but there needs to be at least one condition, to prevent matching all messages. + If you want to match all senders or all recipients, you can just use the @ character as condition because all email addresses will contain this character. If you want to match a domain name, you can use as a condition something like *@example.org* @@ -2727,6 +2728,7 @@ jsoup:html > body > div > a[href=https://example.org] ``` You can use multiple rules, possibly with a *stop processing*, for an *or* or a *not* condition. +Since version 1.2173 there is a *NOT* option for conditions that accept a regex. Matching is not case sensitive, unless you use [regular expressions](https://en.wikipedia.org/wiki/Regular_expression). Please see [here](https://developer.android.com/reference/java/util/regex/Pattern) for the documentation of Java regular expressions. diff --git a/index.html b/index.html index a05ccc930f..409a772386 100644 --- a/index.html +++ b/index.html @@ -1479,14 +1479,15 @@ X-Google-Original-From: Somebody <somebody+extra@example.org>
  • Absolute time (received) between (since version 1.1540)
  • Relative time (received) between
  • -

    All the conditions of a rule need to be true for the rule action to be executed. All conditions are optional, but there needs to be at least one condition, to prevent matching all messages. If you want to match all senders or all recipients, you can just use the @ character as condition because all email addresses will contain this character. If you want to match a domain name, you can use as a condition something like @example.org

    +

    All the conditions of a rule need to be true for the rule action to be executed. All conditions are optional, but there needs to be at least one condition, to prevent matching all messages.

    +

    If you want to match all senders or all recipients, you can just use the @ character as condition because all email addresses will contain this character. If you want to match a domain name, you can use as a condition something like @example.org

    Note that email addresses are formatted like this:

    "Somebody" <somebody@example.org>

    When using a regex, you need to take care to match the complete address.

    Note that message texts are normalized when not using a regex, which means that all whitespaces (spaces, tabs, line breaks, etc) are replaced by a single space. This makes it easier to match texts on multiple lines or when the line break is at different places.

    Since version 1.1996 it is possible to use Jsoup selectors to match HTML elements, by prefixing the selector by jsoup: and entering it as text contains condition, like for example:

    jsoup:html > body > div > a[href=https://example.org]
    -

    You can use multiple rules, possibly with a stop processing, for an or or a not condition.

    +

    You can use multiple rules, possibly with a stop processing, for an or or a not condition. Since version 1.2173 there is a NOT option for conditions that accept a regex.

    Matching is not case sensitive, unless you use regular expressions. Please see here for the documentation of Java regular expressions. Note that you need to match the complete text from the first to the last character. You can test a regex here.

    Note that a regular expression supports an or operator, so if you want to match multiple senders, you can do this:

    .*alice@example\.org.*|.*bob@example\.org.*|.*carol@example\.org.*