On Fri, 9 Jun 2000 21:15:24 +0200, Jast wrote:
> Morning Windisch Gergely,
>> Is there a way to modify the subject of a received message automatically?
>> There is a mailing list that I'm subcribed to and it puts the name of the
>> list to the subject line. (eg. if the subject was 'how to do it' then it
>> changes to '{the name of the list} how to do it') I'd like to remove this
>> name of the list (and of course I'd like to have the original subject).
>> Can I do it with The Bat? (I'm thinkig of a filter that looks for this
>> string and if it is present than it deletes it)
> The second time today, the answer would be a regex. ;-)
I think, Windisch Gergely has another problem. The regexp only helps
when replying but i think the question was to strip the list name
before storing it into a folder. This problem can't be solved inside
TB!, but you can call an external program as part of a filter
action, which could do that. Perhaps there are already ready-to-run
programs that accomplish that? I know that some people use this
method to strip the X-Mailer header from their mails...
> Here is a Re: remover by Peter Steiner from a past discussion:
> %SUBJECT="Re:
>%SETPATTREGEXP='(?i)((Re|Aw)\:\s*)*(.*?)(\s\{mailinglist\})?$'%REGEXPBLINDMATCH='%OSUBJ'%SUBPATT='3'"
> ^^^^^^^^^^^
> insert list
> name here
> This will work if {mailinglist} is at the end of the subject and also
> remove redundant Re:'s and AW:'s. Sorry, I can't at this moment modify it
> to catch the list handle anywhere in the subject, due to my current lack
> of understanding. Anybody wanna help?
In the same past discussion, i posted the following to remove
'[Palm]' (obviously from a Palm related mailing list) from the
subject line:
> %subject=""%subject="Re:
>
>%SETPATTREGEXP=""(?i)(((Re|Aw|Antwort):|\[Palm\])\s*)*(.*)""%REGEXPBLINDMATCH=""%OSUBJ""%SUBPATT=""4"""
>
> Note two things:
> - "((Re|Aw|Antwort):|\[Palm\])" instead of "(Re|Aw|Antwort):",
> having one more level of parentheses
> - %SUBPATT=""4"" instead of %SUBPATT=""3"" because of the additional
> parentheses
>
> You could expand this for more maillists if you replace \[Palm\]
> with \[(Palm|Pilot|whatever)\] and incrementing SUBPATT to 5...
You can replace '\[Palm\]' with '\{maillinglist\}'. The backslashes
are needed in both cases, because brackets and curly braces have
special meanings inside regexps.
Regards
Peter
--
Peter Steiner <[EMAIL PROTECTED]> PGP-ID 0x02850F53 (DH/DSS)
PGP Fingerprint 68AB D08E D995 41B4 C6FD 639D 9B94 D249 0285 0F53
"Du weisch doch, das me n imene Totem�gerli
nid darf nei s�ge!" - Franz Hohler
--
--------------------------------------------------------------
View the TBUDL archive at http://tbudl.thebat.dutaint.com
To send a message to the list moderation team double click here:
<mailto:[EMAIL PROTECTED]>
To Unsubscribe from TBUDL, double click here and send the message:
<mailto:[EMAIL PROTECTED]>
--------------------------------------------------------------
You are subscribed as : [email protected]