Oh, I will post the code. Just give me a little time to get the system it is intended for up and running.
And mind you, it is not pretty and only works with numbers for the time being. Needs some tweaks with type-casting in the right places to get it working with letters.
Cheers
Tobbe