Bugzilla@Mozdev – Bug 26411
Change text based headers based regular Expression matching
Last modified: 2018-04-27 04:33:17
You need to log in before you can comment on or make changes to this bug.
Expanded functions for manipulation of headers, based on Regular Expressions %header.set.matchFromSubject(hdr,regex,group)% %header.append.matchFromSubject(hdr,regex,group)% %header.prefix.matchFromSubject(hdr,regex,group)% %header.set.matchFromBody(hdr,regex,group)% %header.append.matchFromBody(hdr,regex,group)% %header.prefix.matchFromBody(hdr,regex,group)% %header.delete(hdr,regex)% hdr: One of the following list {subject | to | from | cc | bcc | reply-to} regex: A regular expression within double quotes, e.g. "You got an email from .* \((\b[a-zA-Z0-9._+-]+@[a-z0-9.-]+\.[a-z]{2,4}\b)\)" - Note that this function supports match groups. group: The number of the match group, type 0 for inserting the match from the complete string. Notes ===== The header.delete function will work within the field and can be used to remove unnecessary prefixes such as "Re: " from the subject line. If no match is found the header will not be deleted or modified in any way. Therefore it is important to do a visual check on all fields before you send of your emails. No error messages will be issued when no match is found. Prefix and append will check whether the value already exist and avoid duplication. The prefix command should not be used with address fields, instead use append to add more recipients.
Created an attachment (id=8313) [details] 1.5 prerelease 58
(From update of attachment 8313 [details]) Here is a test version which adds the latest requested function which can be used for cleaning up subject lines. Example: %header.delete(subject,"(Fwd: |Re: )")% will delete all English Forward and Reply prefixes from the subject line.
Created an attachment (id=8436) [details] 1.5 prerelease 199 Fixinig [Bug 26512] which caused every other use of identical %matchTextFromSubject()% expressions to be blank (2nd, 4th, 6th... results)
Setting to Resolved Fixed with official Release 1.5