Cheers. Did it the same way.
But I was also actually thinking of something which limits the input and skips fixed characters of the format. E.g. a format like "(XXX)-XXXX XXXX" where the cursor automatically skips chars like ()- and jumps to the next available input position. Nothing really important, would be just a nice UI gimmick though.