First of all, 10.02.0.99 and 109.2.8.06 are perfectly valid. Just because they have an extra 0 doesn't mean they aren't valid. 109.2.8.06 is equal to 109.2.8.6.
Second, use String.split instead, using "\\." as the regex. The \\ will be resolved to a single \ for the regex, which is used to escape the .