Frank, you keep replying only to me. Change that to: only to the
procmail-list.
I found what my problem probably is: My trigger strings contain "$"
character. Properly escaped as "\$", but I believe it is interpreted
some way I do not fully understand.
Change the \$ to [$] to make it survive any reparsing.
In particular: Regexp ' \$[a-z]+' properly catches words starting
with "$" that have at least one space in front of them. However, if
used in conjunction with "${SPACE}", it sometime catches a perfectly
normal word at the beginning of a new line that has no "$" in it.
A bare $ matches a newline.
Summary:
*$ $HALFMAX ^ 0 ()\/${SPACE}\$[a-z]+
does not work reliably. Sometime triggers at the first world on a
new line.
* $HALFMAX ^ 0 ()\/ \$[a-z]+
does work OK.
An explanation would be greatly appreciated.
You should really show a verbose log.
Simple test:
# test92.rc
VERBOSE = 'yes'
DEFAULT = '/dev/null'
NL = '
' SPACE = ' '
HALFMAX = '1073741824'
VAR = "triggerX triggerX${NL}triggerX \$trigger4 trigger5"
:0
*$ VAR ?? $HALFMAX ^ 0 ()\/trigger1
*$ VAR ?? $HALFMAX ^ 0 ()\/trigger2
*$ VAR ?? $HALFMAX ^ 0 ()\/trigger3
*$ VAR ?? $HALFMAX ^ 0 ()\/[$]trigger4
*$ VAR ?? $HALFMAX ^ 0 ()\/${SPACE}trigger5
*$ VAR ?? $HALFMAX ^ 0 ()\/trigger6
*$ -$HALFMAX ^ 0
{
LOG="Match = ${MATCH}${NL}"
}
$ procmail ./test92.rc < /dev/null
procmail: [27757] Thu Nov 24 22:04:02 2005
procmail: Assigning "DEFAULT=/dev/null"
procmail: Assigning "NL=
"
procmail: Assigning "SPACE= "
procmail: Assigning "HALFMAX=1073741824"
procmail: Assigning "VAR=triggerX triggerX
triggerX $trigger4 trigger5"
procmail: Score: 0 0 "()\/trigger1"
procmail: Score: 0 0 "()\/trigger2"
procmail: Score: 0 0 "()\/trigger3"
procmail: Assigning "MATCH="
procmail: Matched "$trigger4"
procmail: Score: 1073741824 1073741824 "()\/[$]trigger4"
procmail: Assigning "MATCH="
procmail: Matched " trigger5"
procmail: Score: 1073741823 2147483647 "()\/ trigger5"
procmail: Assigning "LOG=Match = trigger5
"
Match = trigger5
procmail: Assigning "LASTFOLDER=/dev/null"
procmail: Opening "/dev/null"
Folder: /dev/null
--
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