[MlMt] exclude emails in address pattern ?
Max Rydahl Andersen
max.andersen at gmail.com
Sat Oct 27 03:35:01 EDT 2018
>>
>>> Is there a way via the address pattern to state .*@example\.com is
>>> good, except dad at example.com and wife at example.com ?
>>
>> If you can describe it with a regular expression, then you can put it
>> in. For example, you might be able to do something along the lines
>> of:
>>
>> .*(?<!dad|wife)@example\.com
>
> For people not used to regular expressions, this uses so-called
> negative lookbehind (if you want to google it). It is also possible to
> use negative lookahead:
>
> (?!(dad|wife)@).*@example\.com
>
> That is (perhaps) a bit easier to read in this case. (I have not
> tested it.)
mailmate uses PCRE-like syntax for its regular expression, right ? then
regextester.com is a nice tool for testing.
Then yours seems faulty: https://www.regextester.com/?fam=105641 (still
matches dad and wife).
but Davids (https://www.regextester.com/?fam=105642) seems more precise
(and actually seem to work for me in mailmate)
In any case thanks for both answers - it worked ;)
/max
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freron.com/pipermail/mailmate/attachments/20181027/35c54091/attachment.html>
More information about the mailmate
mailing list