I should also point out that SubStr() doesn't support negative indexes.

I wrote an enhanced SubStr() a while back which does support negative indexes and lengths - search the UDF forum for it if you think it would be useful.