FiltaQuilla icon indicating copy to clipboard operation
FiltaQuilla copied to clipboard

header Regex match: Support using anchor tokens ^ and $ for address lists

Open RealRaven2000 opened this issue 10 months ago • 1 comments

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.

RealRaven2000 avatar Jan 31 '25 11:01 RealRaven2000

This is a patched version, the activation switch can be found on the bottom of Search Terms options in FiltaQuilla settings:

Image

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.

filtaquilla-4.3.2pre7.zip


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)

RealRaven2000 avatar Jan 31 '25 12:01 RealRaven2000

Implemented in 5.0 - published 05/04/2025

RealRaven2000 avatar Apr 05 '25 14:04 RealRaven2000