procmail
[Top] [All Lists]

RE: Special character on the Subject line

2007-06-08 07:25:31
Alex Kosach schrieb on Friday, June 08, 2007 4:15 PM:


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]+
 * MATCH ?? ^^\/[0-9]+
 { CUST_NO = $MATCH }


It doesn't catch this number. Does anybody have any ideas how 
to fix it?

Sure.  Make the condition regex look like the text you
want to find.  You have told us that the format is,
in relevant part, "#123456789".  Then you show us a
condition that tries to find a space after the # sign.
There isn't one, so you never match.

Try

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

You do not need your second condition, either.  It does
nothing useful here.

-- 
dman
____________________________________________________________
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>