procmail
[Top] [All Lists]

Re: Howto use variables in regexp's ???

2003-09-25 20:26:16
Dallman Ross <dman(_at_)nomotek(_dot_)com> [2003:09:25:22:52:36+0200] scribed:
On Thu, Sep 25, 2003 at 03:20:04PM -0500, Michael D Schleif wrote:

This does *NOT* work:

* 1^0 ^subject:[$WS]*$

What am I missing?

The leading dollar sign.

 * $ 1^0 ^subject:[$WS]*$


John Conover <conover(_at_)rahul(_dot_)net> [2003:09:25:21:21:17+0000] scribed:

Try:

    EOL='$'

    * 1^0 $ ^subject:$WS$EOL

and note that the meaning of the '$' character changes, (EOL is no
longer '$' in a regex; it changes to the character for variable
substitution.)

OK, I am confused ;>

man procmailrc:

$    Evaluate  the  remainder of this condition according to sh(1) sub-
     stitution rules inside double  quotes,  skip  leading whitespace,
     then reparse it.

Prior to asking my question, I looked at manpages for procmailrc,
procmailsc and procmailex, and into the examples that are provided on
debian; but, I did not understand that the statement above was my
answer.  To this minute, I still do not understand what this is doing.

Although, once I read these two responses, I thought that John's most
closely matched that manpage snippet; I used dman's -- and it works!

Which side of the weight/exponent does this `$' belong?

Is this a special case, or need I understand corollary cases for !?<>\,
&c?

Where is this documented, so that I can come unto higher learning?

What do you think?

-- 
Best Regards,

mds
-
Dare to fix things before they break . . .
-
Our capacity for understanding is inversely proportional to how much
we think we know.  The more I know, the more I know I don't know . . .
--

Attachment: pgpVS0FJ1FtW3.pgp
Description: PGP signature

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