procmail
[Top] [All Lists]

Re: Newbie From Question (Regex)

2003-02-28 13:29:44
Tom Beer followed up,

| Should I place the dot inside the quotation marks or outside?

Either would work.  So long as the quotation marks enclose the space, the rest
of the characters in the folder name are not among those that would be
affected by quoting.  I guess it *looks* nicer to a human if the entire thing,
from the period through the closing slash, is inside the quotes, but procmail
doesn't care.  Alternatively, you could put a backslash immediately left of
the space and leave the quotes off.

| The
| regex \s should be the place holder for the whitespace. Doesn't
| procmail use regular expressions?

Part 1 of the answer: \s is not a regular expression for a space.  A space is
a regular expression for a space.  Many programs use assorted extensions to
basic regular expressions, but all the extensions differ.  I think \s matches
a space for perl but probably for precious few others.  If you're asking
whether procmail uses regular expressions, yes, it does; but if your question
is whether procmail uses an identical array of regular expression extensions
to those of perl, no, it does not.

Part 2: Procmail uses regular expressions in condition lines, but not in
action lines.  I am not a perl person but I somehow doubt that perl would
understand \s as a space if you used it not in a text search string but in the
name of a file to write to.



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