Version Number (Semantic Versioning) Regular Expression

A regular expression to match valid release, version, and modification numbers (Semantic Versioning X.Y.Z).

/^\d+(?:\.\d+){2}$/

Version Number Examples:

  • 16.3.10
  • 2.0.1
  • 7.1.3