procmail
[Top] [All Lists]

Re: Bill Moseley's ${$MATCH} problem

1999-01-14 09:03:37
Now, where were Philip and I?

T> In our private exchange about it, Philip added that the above would not
T> work if there were a newline in the name of the variable in the previous
T> value of MATCH, but a variable's name shouldn't have an embedded newline
T> anyway in any shell I know of.  Still, if it should,

T>   * $ $MATCH ?? ^^\/[.$]+

G> The newline problem is not with newlines in the variable name but
G> rather in the value of the indexed variable (the variable whose name is
G> in MATCH).  David had a thinko on that last example.  It should have
G> been:
G>      * $ $MATCH ?? ^^\/(.*$)*

Right ... I was confused.  Additionally, I meant (.|$) and not [.$], which
Philip has also fixed; and as he said, it's the final value we're matching to
here, not the name of the variable, which had to be matched earlier, so it
could be null.  Then I believe this would work also:

       * $ $MATCH ?? ^^\/(.|$)*

Thanks for the correction.

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