procmail
[Top] [All Lists]

Re: extract part of subjkect line into variable?

1999-04-07 06:44:31
Mathias Koerber writes:
But that is not what I want to do. I want to extract the 911, not
what is left behind it.
\/ does not provide that solution...

 Something like (untested)

:0h
* ^Subject:[    ]*\[911\]
NINE_ELEVEN=| sed 's,^Subject:[         ]*\[\(.*\)\].*$,\1,'

 maybe? The [ ] after Subject: contain a space and a tab.