The old pattern for determining stable versions only matches if the 2nd part is exactly two, four, six or eight. Change it to be ready for a possible 1.0 or 0.10 stable version in the future.
Recognise all even minor versions as stable
That's not quite right, though... 0.0.2 was anything but stable, and this will not match 0.10.0
I think maybe this pattern does what you want? ([0-9]+|)
Actually recognise 0.10
code + tired = fail
Is not matching 0.0.2 required when the result is immediately sorted descending from latest version and then the latest version only returned?
Yeah, 0.0 versions don't matter, and I guess 1.0.0 will be considered stable. The ? should be a *, though. We may get to 0.100.0 some day ;)
[1-9]?+ should already match 100, no?
edit: ah, but not 110 ;)
Also recognise 0.110
Covering all possible eventualities in all multiverses ftw!
Squashed and landed on a17416a, as [0-9]*, since that's simpler and matches all the same versions as the ([1-9][0-9]*)? bit (since it'll never start with 0).