<< Would it be accptable to use the following
:0 B:
* Sex.*Girls
Which would catch the text sex and girls anywhere in the body.
AND(?) not in all cases, it doesn't take "Girls before Sex"
it is not the same order.
Try to play with egrep(1) from the command line. Do not annoying
your self with files - use the echo(1) command; for example:
echo "Hello World" | egrep -i 'hel?'
The "-i" makes it like procmail, ignore upper\lowercase.
You can change the left side or right side of the pipe by using
the history edit keys (if your shell is tcsh, ksh, bash).
echo "Hello\nworld" | egrep -i 'o$'
The "\n" means NEWLINE.
If your shell's echo command dose not support "\" escape use the
operating system echo command for testing complicated cases. In
most OS /usr/bin/echo in Linux rh7.2 /bin/echo -e
How dose it look in procmail? make a file named "ptest" with
only one recipe:
VERBOSE=yes
LOGABSTRACT=all
SHELL=/bin/sh
DEFAULT=/tmp/ok
:0 B
* ()\/.+
/dev/null
Now, you can test from the command line, try this:
echo "Hello World" | formail -s procmail ptest
The MATCH (the "\/") will show you how procmail see the string.
Use the right side of "\/" to test yours regx. For example:
* ()\/.+[^o]$
and try:
echo "hello\nworld" | formail -s procmail ptest
You will see:
procmail: Assigning "MATCH="
procmail: Matched "world
"
procmail: Match on "()\/.+[^o]$"
I thinks that most of people do not try, test and play with
regular-expression because it is annoy to update the input
file every time - I hope that echo(1) will help somebody.
Bye,
Udi
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail