Semver Compare
Compare two MAJOR.MINOR.PATCH versions.
Compares the first three numeric parts, optional v prefix. Unlike Sort Lines this is not lexicographic. Unlike Regex Tester it does not test a pattern. Pre-release suffixes are ignored. Returns -1, 0, or 1.
What Semver Compare does
Compares the first three numeric parts, optional v prefix. Unlike Sort Lines this is not lexicographic. Unlike Regex Tester it does not test a pattern. Pre-release suffixes are ignored. Returns -1, 0, or 1.
Practical limit for Semver Compare: First three numeric parts. Optional v prefix. Pre-release is ignored. That is why output can differ from heavy desktop Developer software. Read the tool-specific note again: Compares the first three numeric parts, optional v prefix. Unlike Sort Lines this is not lexicographic. Unlike Regex Tester it does not test a pattern. Pre-release suffixes are ignored. Returns -1, 0, or 1.
How to use Semver Compare
- Keep this tab on Semver Compare (/developer/semver-compare). Pasting into the wrong Developer tool (for example Regex Tester) changes the job.
- Paste or type the input Semver Compare expects. Path hint: developer · semver compare. Compare two MAJOR.MINOR.PATCH versions.
- Apply the Semver Compare action only. JSON Formatter is a different transform (Pretty-print or minify JSON with indent and optional key sort.). Compares the first three numeric parts, optional v prefix. Unlike Sort Lines this is not lexicographic. Unlike Regex Tester it does not test a pattern. Pre-release suffixes are ignored. Returns -1, 0, or 1.
- Copy the output of Semver Compare if you need it elsewhere. Size/complexity still follows: First three numeric parts. Optional v prefix. Pre-release is ignored.
- If the text job is actually Test or replace with a JavaScript regex locally., leave Semver Compare and open Regex Tester.
When not to use Semver Compare
Skip Semver Compare when a neighbor tool matches better — start with Regex Tester or JSON Formatter — or when the description already warns the job will fail. In the tool’s own words: Compares the first three numeric parts, optional v prefix. Unlike Sort Lines this is not lexicographic. Unlike Regex Tester it does not test a pattern. Pre-release suffixes are ignored. Returns -1, 0, or 1.
Questions about Semver Compare
- What does Semver Compare do that other Developer pages on this site do not?
- Compares the first three numeric parts, optional v prefix. Unlike Sort Lines this is not lexicographic. Unlike Regex Tester it does not test a pattern. Pre-release suffixes are ignored. Returns -1, 0, or 1. Short version: Compare two MAJOR.MINOR.PATCH versions.
- Does Semver Compare upload my file or text to Tool-You servers?
- No. Semver Compare runs in this browser tab. Files stay on the device. Limit note: First three numeric parts. Optional v prefix. Pre-release is ignored.
- Should I use Regex Tester instead of Semver Compare?
- Use Semver Compare when you need Compare two MAJOR.MINOR.PATCH versions. Use Regex Tester when you need Test or replace with a JavaScript regex locally. They share a category (Developer) but not the same job.
- What are the limits of Semver Compare?
- First three numeric parts. Optional v prefix. Pre-release is ignored. Also: Compares the first three numeric parts, optional v prefix. Unlike Sort Lines this is not lexicographic. Unlike Regex Tester it does not test a pattern. Pre-release suffixes are ignored. Returns -1, 0, or 1.