First Last Prev Next    No search results available
Details
: Change text based headers based regular Expression matching
Bug#: 26411
: smarttemplate4
: General
Status: RESOLVED
Resolution: FIXED
: PC
: Windows NT
: unspecified
: P2
: enhancement
: ---

:
:
:
:
:
  Show dependency tree - Show dependency graph
People
Reporter: Axel Grude <axel.grude@gmail.com>
Assigned To: Axel Grude <axel.grude@gmail.com>

Attachments
1.5 prerelease 58 (389.94 KB, application/x-xpinstall)
2017-08-23 06:13, Axel Grude
no flags Details
1.5 prerelease 199 (463.87 KB, application/x-xpinstall)
2018-04-12 03:50, Axel Grude
no flags Details


Note

You need to log in before you can comment on or make changes to this bug.

Related actions


Description:   Opened: 2017-08-23 05:31
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.
------- Comment #1 From Axel Grude 2017-08-23 06:13:18 -------
Created an attachment (id=8313) [details]
1.5 prerelease 58
------- Comment #2 From Axel Grude 2017-08-23 06:15:04 -------
(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.
------- Comment #3 From Axel Grude 2018-04-12 03:50:51 -------
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)
------- Comment #4 From Axel Grude 2018-04-27 04:33:17 -------
Setting to Resolved Fixed with official Release 1.5

First Last Prev Next    No search results available