View previous topic :: View next topic |
Author |
Message |
meyerm Veteran
Joined: 27 Jun 2002 Posts: 1311 Location: Munich / Germany
|
Posted: Fri Jul 04, 2003 2:42 pm Post subject: script for deleting tag in mail subject (using maildrop) |
|
|
Hi there,
I want to remove some special tag from the subject of a mail. For now, I use
Code: | xfilter "sed -e 's/\[SET\]//'" |
But this also removes the tag inside of mails. What shall I do to just remove it in the subject? (Asking for /^Subject: .*\[SET\]/ won't work since I would loose everything before (f.ex. Re: tags)).
Thanks
Marcel |
|
Back to top |
|
|
taviso Retired Dev
Joined: 15 Apr 2003 Posts: 261 Location: United Kingdom
|
Posted: Fri Jul 04, 2003 10:02 pm Post subject: Re: script for deleting tag in mail subject (using maildrop) |
|
|
meyerm wrote: | Hi there,
I want to remove some special tag from the subject of a mail. For now, I use
Code: | xfilter "sed -e 's/\[SET\]//'" |
But this also removes the tag inside of mails. What shall I do to just remove it in the subject? (Asking for /^Subject: .*\[SET\]/ won't work since I would loose everything before (f.ex. Re: tags)).
Thanks
Marcel |
Use brackets, eg:
Code: | sed 's/\(^Subject:.*\)\[SET\] /\1/' |
_________________ --------------------------------------
Gentoo on Alpha, is your penguin 64bit?
-------------------------------------------------------- |
|
Back to top |
|
|
meyerm Veteran
Joined: 27 Jun 2002 Posts: 1311 Location: Munich / Germany
|
Posted: Sun Jul 06, 2003 1:12 pm Post subject: Re: script for deleting tag in mail subject (using maildrop) |
|
|
taviso wrote: | Use brackets, eg:
Code: | sed 's/\(^Subject:.*\)\[SET\] /\1/' |
|
Great!
Thank you very much
Marcel |
|
Back to top |
|
|
|