extract float from string python

>>> re.findall(r"[-+]?\d*\.\d+|\d+", "Current Level: -13.2 db or 14.2 or 3")
['-13.2', '14.2', '3']

Here is what the above code is Doing:
1. The first part of the regex, [-+]? , matches an optional sign character (+ or -).
2. The second part of the regex, \d*\.\d+ , matches an optional digit (\d), followed by a literal dot (.), followed by one or more required digits.
3. The third part of the regex, | , is a logical OR that matches either the second part of the regex, or the fourth part of the regex.
4. The fourth part of the regex, \d+ , matches one or more digits.

The regex returns a list of all the matches it finds.