I am trying to create a filter that extracts a string from the email subject using RegEx and then uses the result to create a folder for saving.
More specifically, I want to extract the client's PO number from the email subject and create a folder like this:
c:\....\[client name]\[message date].[PO number]\
I already know how to do it using the message text:
Set up a filter with "Action" "Extract attachments", then setting the folder ("Extract attachments to (template)") to:
c:....\%FilterName\%ODATESHORT.%REGEXPTEXT="\d+"
wh ere
1) %FilterName corresponds my client's name.
2) %ODATESHORT is the message's date.
3) %REGEXPTEXT="\d+" matches the first number of the message [assuming this is the PO number]
I have tested this and it works.
Alas, some clients put PO number only in the email subject.
As there is no single macro for using RegEx directly on the subject line (comparable to %REGEXPTEXT), I think I should combine these two macros:
%REGEXPMATCH="%OSUBJ"
%SETPATTREGEXP="\d+"
My problem is, I don't know how to combine these two in the filter action dialogue. This doesn't seem to allow processing multiple commands, i.e. first running %REGEXPMATCH="%OSUBJ" and then %SETPATTREGEXP="\d+".
Maybe there is a special syntax for that? Is this possible at all?
More specifically, I want to extract the client's PO number from the email subject and create a folder like this:
c:\....\[client name]\[message date].[PO number]\
I already know how to do it using the message text:
Set up a filter with "Action" "Extract attachments", then setting the folder ("Extract attachments to (template)") to:
c:....\%FilterName\%ODATESHORT.%REGEXPTEXT="\d+"
wh ere
1) %FilterName corresponds my client's name.
2) %ODATESHORT is the message's date.
3) %REGEXPTEXT="\d+" matches the first number of the message [assuming this is the PO number]
I have tested this and it works.
Alas, some clients put PO number only in the email subject.
As there is no single macro for using RegEx directly on the subject line (comparable to %REGEXPTEXT), I think I should combine these two macros:
%REGEXPMATCH="%OSUBJ"
%SETPATTREGEXP="\d+"
My problem is, I don't know how to combine these two in the filter action dialogue. This doesn't seem to allow processing multiple commands, i.e. first running %REGEXPMATCH="%OSUBJ" and then %SETPATTREGEXP="\d+".
Maybe there is a special syntax for that? Is this possible at all?