fork download
  1. import re
  2. s=".42 5.42 5. ."
  3. print(re.findall(r'(?=\.?\d)\d*\.\d*', s))
Success #stdin #stdout 0.02s 6820KB
stdin
Standard input is empty
stdout
['.42', '5.42', '5.']