Your expression says capture one or more digits, followed by a period. followed by one or more digits. So it will only capture 2.0, 2.1 etc.
Try this:
(\d+(\.\d+)*)
^ ^ ^ ^ ^
1 2 a b c
1. One or more digits followed by
2. A group containing
a. A single period (dot) followed by
b. One or more digits
c. Repeated any number of times