If I enter something like this: a1.b22.333, I want it to output either:
1.22333 or 122.333
It gets rid of the non digit characters and any periods beyond 1.
My best guesses at this have been:
obj.value = obj.value.replace( /[^0-9\.{1}]+/g , '');
obj.value = obj.value.replace( /[^0-9\.{2,}]+/g ,'');
obj.value = obj.value.replace( /[^0-9\.(?=.*\.)]+/g ,'');
But these all output 1.22.333
How can I get rid of that extra period?
Thanks for your help.