SemVer
What this is
Official SemVer has a terrifying official regex. This one covers the 99% case for changelogs and tags.
/\b\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?\b/g1.2.3 1.2.3-beta.1 1.2.3+build.9
FAQ
- v1.2.3?
- Strip a leading v in code rather than complicating the pattern.