procmail
[Top] [All Lists]

Re: misunderstood regexp

2005-07-13 15:57:39
Michelle Konzack:

it should be:

    :0
    * ^Subject:.*[[flashfr]
    .mlists/Flashfr/

You obviously don't understand what [[] means.

From 'man grep':
A list of characters enclosed by [ and ] matches any  single  character
in that list; if the first character of the list is the caret ^ then it
matches any character not  in  the  list.   For  example,  the  regular
expression  [0123456789]  matches any single digit.  A range of charac-
ters may be specified by giving the first and  last  characters,  sepa-
rated  by  a  hyphen. [...] Most
metacharacters lose their special meaning inside lists.  To  include  a
literal  ] place it first in the list.  Similarly, to include a literal
^ place it anywhere but first.  Finally, to include a literal  -  place
it last.

So [[] is a list with a single character, the '['.


Your '[[flashfr]' could be shortened to '[[flashr]', since each
character only needs to be in the list once.
But it still won't do what was asked for.

-- 
Grtz, Ruud


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