General-Purpose Mail Filter
An s-expression is a
sed-like transformation expression:
where regexp is a regular expression, replace is a replacement for each part of the input that matches regexp. Both regexp and replace are described in detail in The ‘s’ Command in GNU sed.
sed, you can give several replace expressions,
separated by a semicolon.
Supported flags are:
Apply the replacement to all matches to the regexp, not just the first.
Use case-insensitive matching
regexp is an extended regular expression (see Extended regular expressions in GNU sed).
Only replace the numberth match of the regexp.
Note: the POSIX standard does not specify what should happen
when you mix the ‘g’ and number modifiers.
follows the GNU
sed implementation in this regard, so
the interaction is defined to be: ignore matches before the
numberth, and then match and replace all matches from the
Any delimiter can be used in lieue of ‘/’, the only requirement being that it be used consistently throughout the expression. For example, the following two expressions are equivalent:
Changing delimiters is often useful when the regex contains
slashes. For instance, it is more convenient to write
This document was generated on January 3, 2019 using makeinfo.Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.