Hello Kevin, Many thanks for your prompt and helpful response! Kevin J. McCarthy (2026/03/29 20:05 +0800): > On Sun, Mar 29, 2026 at 12:45:13PM +0200, Sébastien Hinderer wrote: > > In my configuration I have hooks like > > > > save-hook '~f amazon.fr' '=amazon/' > > > > 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 an > example. It shows send-hook, but this also works for save-hook.
Oh ye, indeed! But then is it documented somewhere that ^ and $ work? Is it on purpose that they are not mentionned in the part of the manual about regular expressions? > Also notice in the example how "." is backslashed, because that matches any > character. I indeed didn't pay attention so far. I think I was under the wrong impression that, because the pattern is between single quotes, . is taken litteraly. So we agree that, for isntance int he example you show, the quotes are not at all optional and that, although they are there, the special characters occurring in regular expresisons between these quotes do need to be escaped to get back their ordinary meaning? Thanks again, Seb.
