Hi I would like to be able to extract just floats from a string
str = "Test string 1.234 0.155.1 5.67799350,-2.654657
Outcome should be
[1.234, 5.67799350, -2.654657]
I was using [-+]?\d*\.\d+|\d+
but it detect the 0.155.1 which I don't want.
import re
floats = re.findall(r"[-+]?\d*\.\d+|\d+", str)
Thanks for your reading.