Description
Select strict SemVer prerelease identifier prefix matches by complete literal identifiers, not substring regex or build metadata.
Semantic versions have a major.minor.patch core, optional prerelease identifiers after a hyphen, and build identifiers after a plus. Prereleases precede the corresponding release; build metadata does not affect precedence. A textual spelling, an equal-precedence group and a major.minor release lane therefore answer different questions.1
Select strict SemVer prerelease identifier prefix matches by complete literal identifiers, not substring regex or build metadata.
When to use this tool
Use this tool to select strict SemVer prerelease identifier prefix matches by complete literal identifiers, not substring regex or build metadata.
How to use the tool and how it works
- Enter versions, prefix using the field definitions below.
- Run the operation. Correct input errors before interpreting an output.
- Read result.versions. Use the ordering, boundary rules and absence conditions described below.
Parse each version and select those whose prerelease identifiers begin with the exact supplied prefix tokens, retaining input order and indexes.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| versions | Semantic-version strings in the source order to inspect. | Dense list of at most 128 strings, each at most 8,192 UTF-16 code units. |
| prefix | Exact prerelease identifier-string prefix to match. | Dense list of at most 128 strings, each at most 8,192 UTF-16 code units. |
| Output field | Interpretation |
|---|---|
| result | Object containing the named fields below. |
| result.versions | Selected or sorted original version spellings with their original indexes. |
{
"input": {
"versions": [
"1.0.0-alpha.1",
"1.0.0-beta.1"
],
"prefix": [
"alpha"
]
},
"output": {
"result": {
"versions": [
{
"index": 0,
"version": "1.0.0-alpha.1"
}
]
}
}
} Limitations and assumptions
- An empty prefix matches every parsed version; matching is case-sensitive and not a version-range expression.
- Version text is limited to 1,024 UTF-16 code units with no whitespace. Parsed core and numeric prerelease components must be nonnegative safe integers. Range expressions and a leading v are not accepted.
- Every declared top-level input field is required and unexpected fields are rejected. Ordinary strings are limited to 8,192 UTF-16 code units and lists to 128 entries, with tighter operation-specific bounds where stated. JSON text has bounded nesting and node counts.
- Numeric outputs must be finite and no larger in absolute magnitude than the safe-integer limit; operations returning exact large integers use decimal text. Positions are zero-based and spans end exclusively unless the operation explicitly states a different convention.
Alternative or Complementary methods
Choose whether you need exact spelling, precedence or a release-lane grouping. Use a separate package manager or compatibility review for dependency resolution and release-policy decisions.
References
-
Semantic Versioning 2.0.0 — Semantic Versioning
-
Tool behavior and example: Semantic Version Prerelease Prefix Selector — tool.io
Similar or alternative tools
- Semantic Version Prerelease Counter Bump
Bump the final numeric identifier in a matching SemVer prerelease lane or start the supplied label at zero; changing labels resets the lane and build metadata is removed.
- Semantic Version Prerelease Record Extractor
Extract strict SemVer prerelease identifiers with numeric versus textual evidence using the existing parser; no build precedence.