Better regex for detecting stable version tags (fixes #1772)