There is a string containing a number with several decimal places. How to convert unnecessary characters when converting to number? Let's say only one decimal is allowed, and there are 2 or 3 in the line. You need to get a number without these extra characters. How to make it easier?