<sect1 id="patterns">
<title>Patterns: Searching, Limiting and Tagging</title>
+<sect2 id="patterns-modifier">
+<title>Pattern Modifier</title>
+
<para>
Many of Mutt's commands allow you to specify a pattern to match
(<literal>limit</literal>, <literal>tag-pattern</literal>,
<para>
Where <emphasis>EXPR</emphasis> is a
-<link linkend="regexp">regular expression</link>. Special attention has to be
+<link linkend="regexp">regular expression</link>.
+</para>
+
+<para>
+*) The forms <quote><[<emphasis>MAX</emphasis>]</quote>, <quote>>[<emphasis>MIN</emphasis>]</quote>,
+<quote>[<emphasis>MIN</emphasis>]-</quote> and <quote>-[<emphasis>MAX</emphasis>]</quote>
+are allowed, too.
+</para>
+
+<para>
+**) The suffixes <quote>K</quote> and <quote>M</quote> are allowed to specify kilobyte and megabyte respectively.
+</para>
+
+<para>
+Special attention has to be
made when using regular expressions inside of patterns. Specifically,
Mutt's parser for these patterns will strip one level of backslash (<quote>\</quote>),
which is normally used for quoting. If it is your intention to use a
regular expressions but can be considerably faster. This is especially
true for IMAP folders, because string matches can be performed on the
server instead of by fetching every message. IMAP treats <literal>=h</literal> specially:
-it must be of the form "header: substring" and will not partially
+it must be of the form <quote>header: substring</quote> and will not partially
match header names. The substring part may be omitted if you simply
wish to find messages containing a particular header without regard to
its value.
</para>
<para>
-*) The forms <quote><[<emphasis>MAX</emphasis>]</quote>, <quote>>[<emphasis>MIN</emphasis>]</quote>,
-<quote>[<emphasis>MIN</emphasis>]-</quote> and <quote>-[<emphasis>MAX</emphasis>]</quote>
-are allowed, too.
-</para>
-
-<para>
-**) The suffixes <quote>K</quote> and <quote>M</quote> are allowed to specify kilobyte and megabyte respectively.
-</para>
-
-<sect2 id="patterns-modifier">
-<title>Pattern Modifier</title>
-
-<note>
-<para>
-Note that patterns matching 'lists' of addresses (notably c, C, p, P and t)
+Patterns matching lists of addresses (notably c, C, p, P and t)
match if there is at least one match in the whole list. If you want to
make sure that all elements of that list match, you need to prefix your
pattern with <quote>ˆ</quote>.
This example matches all mails which only has recipients from Germany.
</para>
-</note>
+<example id="ex-recips">
+<title>Matching all addresses in address lists</title>
<screen>
^~C \.de$
</screen>
+</example>
</sect2>
-<sect2 id="simple-patterns">
-<title>Simple Patterns</title>
+<sect2 id="simple-searches">
+<title>Simple Searches</title>
<para>
-Mutt supports two versions of so called <quote>simple searches</quote> which are
+Mutt supports two versions of so called <quote>simple searches</quote>. These are
issued if the query entered for searching, limiting and similar
-operations does not seem to be a valid pattern (i.e. it does not contain
+operations does not seem contain a valid pattern modifier (i.e. it does not contain
one of these characters: <quote>˜</quote>, <quote>=</quote> or <quote>%</quote>). If the query is
supposed to contain one of these special characters, they must be escaped
by prepending a backslash (<quote>\</quote>).
</sect2>
<sect2 id="complex-patterns">
-<title>Complex Patterns</title>
+<title>Nesting and Boolean Operators</title>
<para>
Logical AND is performed by specifying more than one criterion. For