Test, validate and match regular expressions
The official SemVer 2.0.0 regular expression for validating semantic version strings like '1.2.3-alpha.1+build.5'. It captures major, minor, and patch segments (rejecting leading zeros), an optional hyphen-prefixed pre-release tag of dot-separated numeric/alphanumeric identifiers, and an optional plus-prefixed build metadata section. The global and multiline flags allow finding all version strings throughout multi-line text, making it ideal for package managers, changelog parsers, and release tooling.