procmail
[Top] [All Lists]

Re: Special character on the Subject line

2007-06-08 09:11:25

On 8-Jun-2007, at 08:14, Alex Kosach wrote:

I need to extract a number from the subject line where Subject line is
something like that:

Some text (Customer #12345679)


My current recipe is the following:

:0
 * ^Subject: .*Customer # ()\/[0-9]+

This says "in the header Subject look for (anything) followed by  
Customer, a space, the number sign (octothorpe), another space, and  
then capture any number of characters in the range 0-9."

the () is nonsensical in this case.  What you want is

^Subject: .*Customer #\/[0-9]+

and then

 { CUST_NO = $MATCH }


-- 
It's better to burn out than it is to rust
   -- Neil Young as quoted by Kurt Cobain

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>