procmail
[Top] [All Lists]

Re: Getting partial matches from a string without forking an outside process

2005-01-09 20:41:22
On Sun, 09 Jan 2005 19:39:17 +0100, Dallman Ross <dman(_at_)nomotek(_dot_)com> 
wrote:

Okay, but as Ruud showed, once we have our foreshortened string, it's
trivial to then find the right side.

  :0
  * fullstring ?? ^^$\leftpart\/.*
  { rightpart = "$MATCH" }

I tried exactly that approach in my "mimepart" recipe [*] but found
that it does not work when $leftpart contains an embedded newline.  It
appeared (at the time) that what happens is that $\leftpart causes the
newline to be prefixed with a backslash, which when parsed again by
the regex engine is then recognized as a line continuation, causing
the newline itself and any whitespace that follows it to be ignored.

Have you tested your splitter on strings containing embedded newlines?

[*] http://www.well.com/user/barts/email/mimepart.txt

____________________________________________________________
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

<Prev in Thread] Current Thread [Next in Thread>