header Regex match: Support using anchor tokens ^ and $ for address lists
When matching Headers with the regex methods, at the moment address lists are concatenated with ", " like this:
ccList:
[email protected], [email protected], [email protected]
in order to easily process each of the email addresses separately with the same regular expression, it would be highly advantageous to convert this into a line-separated list:
ccList:
[email protected]
[email protected]
[email protected]
then it is much easier to create a regular expression that looks for domain names, without creating false positives, like this:
ccList:
/@(.*\.)*foobar\.fr$/gim
this would match [email protected] but would not create a false positive with [email protected] which is a different domain.
In order to remain backwards compatible, we can add a global option to toggle this new behavior.
This is a patched version, the activation switch can be found on the bottom of Search Terms options in FiltaQuilla settings:
once the switch is activated, the address headers ccList, bccList and recipients are broken up into multiple lines and then you can use the /m (multiline) regex switch and the anchors ^ and $ to denote start and end of lines (i. e. for each address in the list). This is a lot more useful than evaluating them as a comma separated list string.
To install version above download zip file and drag the file into Thunderbird Add-ons Manager (do not extract contents, it won't install like that)
Implemented in 5.0 - published 05/04/2025