3 ms·
> - Is 1.2.3gamma > 1.2.3? Yes I wrote this example, because I knew the answer. And your interpretation (the same as my initial one) is wrong :) > Pre-release
by cookiengineer 4y ago
> - Is 1.2.3gamma > 1.2.3? Yes
I wrote this example, because I knew the answer. And your interpretation (the same as my initial one) is wrong :)
> Pre-release versions have a lower precedence than the associated normal version.
[1] https://semver.org/#spec-item-9 https://semver.org/#spec-item-9
- tsimionescu 4y ago1.2.3gamma is not a pre-release version, it is a malformed version string (assuming SemVer). A proper SemVer is something like [0-9]+[.][0-9]+[.][0-9]+(-[0-9a-zA-Z]+)?([+][0-9a-zA-Z]+)? > 2. A normal version number MUST take the form X.Y.Z where X, Y, and Z are non-negative integers, and MUST NOT contain leading zeroes. X is the major version, Y is the minor version, and Z is the patch version.
- Nezghul 4y agoWell, if You want to compare strings according to some rules then... write a custom comparator.