From 80595865a20f6aed0e10be6c8e7cbcf4c4fa191c Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 22 Jun 2024 19:52:15 +0200 Subject: [PATCH] Updated FAQ --- FAQ.md | 10 ++++++++-- index.html | 4 +++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/FAQ.md b/FAQ.md index 6ad0938e75..1b425038ea 100644 --- a/FAQ.md +++ b/FAQ.md @@ -2804,11 +2804,17 @@ Please see [here](https://developer.android.com/reference/java/util/regex/Patter Note that you need to match the complete text from the first to the last character. You can test a regex [here](https://regexr.com/). +You can use a regex like this to match a top-level domain (tld): + +``` +.*@.*\.xyz.* +``` + 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.* -`` +``` Note that [dot all mode](https://developer.android.com/reference/java/util/regex/Pattern#DOTALL) is enabled to be able to match [unfolded headers](https://tools.ietf.org/html/rfc2822#section-3.2.3). diff --git a/index.html b/index.html index 959a53219f..94106ee821 100644 --- a/index.html +++ b/index.html @@ -1530,8 +1530,10 @@ X-Google-Original-From: Somebody <somebody+extra@example.org>
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. 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.

+

You can use a regex like this to match a top-level domain (tld):

+
.*@.*\.xyz.*

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.*

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

Note that dot all mode is enabled to be able to match unfolded headers.


Expressions