RealRaven2000 / FiltaQuilla

Adds many new mail filter actions to Thunderbird
http://quickfilters.quickfolders.org/filtaquilla.html
GNU General Public License v3.0
88 stars 17 forks source link

Subject Regex Match: unable to match `Re: ` messages #311

Open anthonyvdotbe opened 3 weeks ago

anthonyvdotbe commented 3 weeks ago

This message (in .eml format, renamed to .txt for GitHub) has a subject of:

Re: RFR: 8321500: javadoc rejects '@' in multi-line attribute value

However, I'm unable to match it with Subject Regex Match matches Re:.*RFR: 8321500: .*.

PS: what is the exact syntax for the regexes? Are these JavaScript regexes?

RealRaven2000 commented 3 weeks ago

However, I'm unable to match it with Subject Regex Match matches Re:.*RFR: 8321500: .*.

PS: what is the exact syntax for the regexes? Are these JavaScript regexes?

indeed. As the whole Add-on code runs in JavaScript, just like all Mozilla front ends, test it here, and put the flavor to ECMAScript. I think Mozilla is running ECMAscript 6.0 for the last number of years.

anthonyvdotbe commented 3 weeks ago

Thanks for the quick response. When I test it on regex101, the subject matches. The issue seems to be with the "Re: ". With the add-on in Thunderbird: .*RFR: 8343306: .* matches .+RFR: 8343306: .* does not match

RealRaven2000 commented 3 weeks ago

not sure why .+ fails. but you don't need to match the complete subject line, "matches" means that the pattern is found within the subject line. I suggest a pattern like this:

/: RFR: 8321500:/

this will make sure that it's a reply (or follow up to a forwarded message) because it starts with the :

anthonyvdotbe commented 3 weeks ago

/: RFR: 8321500:/ does not match either, but ^RFR: 8321500:.*value$ does match. So FiltaQuilla acts as if the Re: is not there at all.