procmail
[Top] [All Lists]

Re: Beginner - please help

2007-04-15 08:16:44
Udi,

      Some examples to show that  \<  can be substitute for NEWLINE
      but, not all the times:

:0 HB
* aaa(.*\<)?bbb
{ HOST= }

Actually, what you've proved is that . cannot match newline, which we 
know.  Here's what you thought was a counterexample:

prompt# echo -e 'aaaQQQ\012PPP\012bbb' | procmail ./proc
...
procmail: No match on "aaa(.*\<)?bbb"

Since your expression allows zero or one matches to (.*\<) but not more 
than one, you're requiring either the first newline to match dot, which 
it won't, or the P after the first newline to match b, which it doesn't. 
  If your regexp were

  aaa(.*\<)*bbb
or
  aaa(.*\<)+bbb

either of which allows for more than one occurrence of .*\< between aaa 
and bbb, the text would have matched.

\< matched newline just fine, but . shouldn't, doesn't, and didn't.


____________________________________________________________
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