Finding all digits that may be followed by a decimal point

Viewed 80

I am trying to findall combinations of of a digit followed by decimal point and another digit. The last final decimal point may be missing

E.g., 
1.3.3 --> Here there are two combinations 1.3 and 3.3
1.3.3. --> Here there are two combinations 1.3 and 3.3

However, when I run the following code?

st='1.2.3 The Mismatch of Accommodation and Disparity and the Depths of Focus and of Field'
import re
re.findall('\d\.\d+',st)
['1.2']

What am I doing wrong?

2 Answers
Related