I have a list of data as follows

1.1.
1.1.1
1.1.1.1
1.1.1.2
1.1.1.3
1.1.1.3.1
1.1.1.3.1.1
1.1.2
1.1.2.1
------

What I want to do is be able to group at the 2nd level (e.g., 1.1.1 and 1.1.2) is there a faster way to do this rather than eyeballing my way down the data?