procmail
[Top] [All Lists]

Re: \[ works within [...] but \] doesn't

2003-11-15 11:48:31
On Sat, 15 Nov 2003, Robert Allerstorfer wrote:

I am currently using the test recipe

 C = "['/@#_!=,;: \\\"\`\$\.\*\+\-\?\^\(\)\[\]]"

But, when the "]" character is in the subject instead of "[", it does
not work

That's because backslashes are not special inside procmail [ ] character
classes.  The backslashes that are doing any good there are the ones in
the substring "\\\"\`\$" -- and that's only because the entire thing is 
inside double quotes for the assignment.

The only way to quote a ']' within a character class is to place it at the
beginning of the class.  I'm pretty sure the same goes for a hypen as well
-- that is, "[\-\]" is being read as "the range backslash to backslash".

Try:

C = "[-]['/@#_!=,;: \\\"\`\$.*+?^()]"



_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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