Yours only removes letters, leaving any other non-number characters in the text.
Also when using $regsub() you should generally declare the receiving variable (%tmptxt in this case) as local with var beforehand, otherwise you leave a global variable behind.