Answer the question
In order to leave comments, you need to log in
How to leave only numbers and period in a string?
The input is a line of the form:
avs1gd6sdas2.sdas22
I leave ONLY NUMBERS with a regular expression:
/[^0-9]/
Result: 16222
But you also need to leave dots. What will the regular season look like?
Expected result: 162.22
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question