Re: Matching the beginningor end of an address

"Kevin J. McCarthy" <[email protected]> Sun, 29 Mar 2026 20:05:45 +0800
Newsgroups gmane.mail.mutt.user
Message-ID <ackVmbh0E_8iRaOC@qinghai>
--oyRRYq3bQ97gpvsk
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Mar 29, 2026 at 12:45:13PM +0200, S=C3=A9bastien Hinderer wrote:
>In my configuration I have hooks like
>
>save-hook '~f amazon.fr' '=3Damazon/'
>
>As such, I am assuming that a mail sent from any address *ocntaining*
>amazon.fr, like for instance [email protected], would
>match.
>
>Is there a way to make the regexp more restrictive and to match those
>messages where amazon.fr appears at the end of the address?

Yes, see the example at http://www.mutt.org/doc/manual/#pattern-hook for=20
an example. It shows send-hook, but this also works for save-hook.

Also notice in the example how "." is backslashed, because that matches=20
any character.

--=20
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA

--oyRRYq3bQ97gpvsk
Content-Type: application/pgp-signature; name=signature.asc

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEiXWpszqjeRA4XFMIre92hIAxa9oFAmnJFZkACgkQre92hIAx
a9osGA//SJ87yPPQx4BBoFdaqPMJnXkZ7ZtAU+2S8YfChJIs2O7+YRPHyuky1M/E
8IhU7Vkxt++aVDugpnih5dUPyT0JP5SSehEsGLgjkZh4r6f9l/x1kscpICTgMkmA
yzgcSjfHh4OTAvtBN9bn1tEiDdzzrJDuCb8EmdoRSt0nhlmt9ypWHkCln4R4Dd4s
7IXoIjG6PTbiUbylpvu3GSf0QtPiHheiNhaFQokR6xp8br695kKpw1e+EPgC/199
cqDipzeu9K7IMdJXucZihzuIFwBUu1zHmNv75d3I22+O4Y6O2jajtUqqRfpQPtW4
OC3r3ezKo1YoZviopzMa6zVokxnEa24ynZ7PiSNbWpEjpgs9KRWFbEsC1W7pCbZp
BB+6zwDkzlRL0ZKhkEyzNgziLLBnGgGN7uRGW824malb7QbKNcuhsf3Co696i4/k
uwQravoGOxKZpTjsPbDewvhZCBLWGuCsqBc5TO1jRA4XiuZjV0nSN+atzMBGUJLR
4TRNwLepfN1N83XViKT8knjJhLer2N9SiW9P8pBvWZ0QibCCu0JkzE2ImFHRzPGe
n7n7DqkBfDPNmd7RzA7gtwFmFbuL5xHBCbroxOWCfFtWN8VMhBX5ma/a4+Wyrflh
/xUCjDD0zioCrM+wlkdAosm5tLu4EvepMn/hMdA9Vy2CqD+dv/U=
=NUKW
-----END PGP SIGNATURE-----

--oyRRYq3bQ97gpvsk--