Solution 1 :

You could parse the text into numbers, it will erase any useless padding. Then you transform back to a string.

Like this : const parser = input => Number(input).toString();

Problem :

given that they are in the beginning in using the “html” interface and the Js language…. I’d have a little problem to solve….. I tried to take a look at the sequence of control characters (pattern), but I couldn’t solve…… I would need to eliminate the initial “zero”, in front of other possible numbers (only numbers, positives and decimals)….. (example: 045(no) ; 45(ok) ; 0450.85(no) ; 450.85(ok) ; 04500(no) ; 4500(ok)…. Etc… inserting into an “inputBox” with type:”text”…….Thank you….. Joseph.