In this case I perfectly see that sprintf does the job very well. Only the problem is, that at some other places I will soon have to concatenate strings that cann be only digits, letters, ... a lot of them start with leading 0 that I will need to print out later. I have no clear formatting, at least there are about 12 formats I have seen yet. I do not want to create a regexp for each.