Many token idents support negative indexes, but not all. For example, $gettok(a b c d e,-1,32) returns "e", but $findtok(A b c A d e A,A,-1,32) does not return "7" (as $findtok(A b c A d e A,A,3,32) does). $findtok, $matchtok, $wildtok, $reptok and $remtok should accept a negative N and act on the <total+1+N>th token, just like $gettok. Imo, the ability to use negative indexes should be extended to almost every mirc identifier that accepts a N (for example $line()), but you can get away with adding it to just these token idents, for now :tongue:

And while you're at it, make $remtok/$reptok accept 0 as N and remove/replace ALL instances of the token in the input. I think this would be extremely useful, perhaps even more than the previous suggestion.