procmail
[Top] [All Lists]

Re: \/ and whitespace

2006-02-28 14:47:24
Robert Allerstorfer schreef:

I think my preferred form for now on wil be
  * $ ^to:[$WS]*\/[^$WS].*
because it is more clear to understand what it does.

I have no real problem with that, it might even be faster.

The main point is that it obscures the functionality of the \/ operator,
so the code might lead to a wrong understanding of what the \/ is and
does. That is why I prefer to use

  * $ ^To:.*\/[^$WS].*

in procmail code that I show on this list. Actually I have a

  $s = "[$WS]"
  $S = "[^$WS]"

which leads to

  * $ ^To:.*\/$S.*

and even to

  * $ ^to:$s*\/$S.*


if a regex should match case insensitive (like here)
using all-lowercase characters makes more sense for me.

Yes, the "X-Old-Subject:" format is (also) making "false promises", so
maybe we should all start doing that here. It will take some time
because everybody is used to the capitalized format, and a copy-paste
from a message is always with capitals.

Another nice thing would be if everybody would indent all published
code, with at least 2 spaces.

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