Package: procmail
Version: 3.22-16
Severity: normal

hi

I've got troubles recently with how the '\/' token gets into play in a 
recipe's RE, eg:

* ^subject: *\/.+

that should catch everything to the right *after last ' '* after ':' and
put it into MATCH, ie that's supposed to be like 

%  sed -r "s/^subject: *(.+)/\1/i"

but that seems not the case; here's a test:

#--[.prc]---
VERBOSE=yes
:0i
* ^subject: *\/.+
|echo "$MATCH" >&2
#-----------
$ echo -e "To: oo\nFrom: oo\nSubject:  4\n\nx\n."|procmail -m /tmp/.prc
procmail: [23282] Tue May 22 22:25:29 2007
procmail: Assigning "MATCH="
procmail: Matched "  4"
procmail: Match on "^subject: *\/.+"
procmail: Assigning "LASTFOLDER=echo "$MATCH" >&2"
 Subject:  4
   Folder: echo "$MATCH" >&2                                                  34
procmail: Executing "echo "$MATCH" >&2"
  4

ie it's like ' *' after ':' was ignored, it acts like 'formail -x subject:';
the expected result would be instead:

$ echo -e \
  "To: oo\nFrom: oo\nSubject:  4\n\nx\n."|sed -r "s/^subject: *(.+)/\1/i"
To: oo
From: oo
4

x
.

manual warns about weird MATCH results for suboptimal/complex RE, but above
RE isn't suboptimal nor complex, so this looks like an (undocumented) bug. 


thanks
--
paolo



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to