procmail
[Top] [All Lists]

Re: Weight & and Or

2002-06-27 09:59:15
On Wed, 26 Jun 2002, S Semple wrote:

Im trying to understand "and" "or" and weight.

I understand the simple

(dog|cat).*house

Which I think should catch doghouse or cathouse or cat house or dog
house. But not just house or cat or dog for that matter.

However Im confused when I see things like, (I have removed some
words to shorten it.)

((barely \
*legal|nude)*\
*(teen|slut))

        The parentheses can be nest.  The "\" in the end of the line means:
        the continue is in the next line, that is:
                "((barely *legal|nude)**(teen|slut))"
        Dabble "*"'s  is just like one.

        (dog|cat) (house|food)  will give you the four options.
        (dog|cat)* (house|food) will give you the four option _AND_:

" food"  or  " house"  or "dogdog food"

        Procmail man pages will not help you.  The answers are in egrep(1)
        man.  Try and play with egrep from the command line before you start
        building recipes, then read the procmail's man about some difference
        from egrep.

        Example how to play with egrep from command line:

echo "dooog house" | egrep '(do*g|cat) (house|food)'


        BTW. when I see things like barely legal nude I'm confused too.

Bye,
 Udi

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