procmail
[Top] [All Lists]

Re: how to drop last N characters from string?

1997-12-04 12:00:04
Thu 97-12-04 "David W. Tamkin" <dattier(_at_)miso(_dot_)wwa(_dot_)com> 
list.procmail
| Jari Aalto asked,

Thank you!

| Because the $ is matched to a putatitve newline rather than a real one,
| it will not appear in the resulting value of $MATCH.
|
|       * VAR ?? 89\/..$


I worded my question badly, I wantod to "chop off", ie delete 2 last
characters from the previos match, not to get last 2 ones. That will
give me "90", but I wantes all the rest without "90".

Waiting for another try :-)

| 
| |     Also what's the procmail way to increment variable by N ?
| 
|      :0
|      * $ $VAR^0
|      * $ $N^0
|      { VAR = $= }

This scoring drives me nuts. How does this actually work? If I understand
right, the $VAR^0 test for variable existense...or does it test that it
contains a number?

jari