I'm using Jquery's mask to automatically place the ml (milliliter) suffix in the input that gets the size of a bottle.
being the id of the input #tape:
var tamanho = $("#tamanho").val();
A 200 ml example will only pick up the 200 value.
but console.log(tamanho)
returns 200 ml
and I only need the value if it is not impossible to do calculations.
Which regular expression should I use to capture only input numbers?
where should I put this regular expression to add the value to variable tamanho
?