procmail
[Top] [All Lists]

if $MATCH starts with a newline

1997-11-19 13:00:50
Philip Guenther posted his patch for MATCH to drop an initial newline without
collecting an extra character from the end; the question left open is what to
do when you *want* a leading newline in $MATCH.  I can't think of a situation
where anybody would, but that's just the limitation of my imagination.

Perhaps a patch to leave an initial newline in $MATCH (if real, not if
putative) would have been better; then the final results would be under
the control of the person writing the rcfile.

Era Eriksson posted, as well,

| (If one actually wanted to match a literal newline, how would that be
| accomplished?)

One can with $ or ^ as usual; the only problem is getting it into $MATCH
if it is the first character to the right of \/.  I guess ...

      :0flags
      * condi\/tions
      { VAR=$MATCH

       :0
       * VAR ?? ^^.
       { VAR="
$MATCH" }
      }

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