Parse differently formatted versions correctly

Previously certain versions were not in a format supported by this
utility e.g. v1.0.0-SNAPSHOT-b20