We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b7360ca commit 4763bceCopy full SHA for 4763bce
index.js
@@ -1,5 +1,5 @@
1
export default function semverRegex() {
2
- return /(?<=^v?|\sv?)(?:(?:0|[1-9]\d{0,9}?)\.){2}(?:0(?!\d)|[1-9]\d{0,9})(?:-(?:0(?!\d)|[1-9]\d*|[\da-z-]*[a-z-][\da-z-]*)){0,100}?(?=$| |\+|\.)(?:(?<=-\S+)(?:\.(?:[\da-z-]*?[a-z-][\da-z-]*|0(?!\d)|[1-9]\d*)){1,100}?)?(?!\.)(?:\+(?:[\da-z-]+(?:\.[\da-z-]+)*){1,100}?(?![\w+-]))?(?!\+)/gi;
+ return /(?<=^v?|\sv?)(?:(?:0|[1-9]\d{0,9}?)\.){2}(?:0(?!\d)|[1-9]\d{0,9})(?:-(?:0(?!\d)|[1-9]\d*|\d*[a-z-]+\d*)){0,100}?(?=$| |\+|\.)(?:(?<=-\S+)(?:\.(?:[\da-z-]*?[a-z-][\da-z-]*|0(?!\d)|[1-9]\d*)){1,100}?)?(?!\.)(?:\+(?:[\da-z-]+(?:\.[\da-z-]+)*){1,100}?(?!\w))?(?!\+)/gi;
3
}
4
5
export const SEMVER_REGEX = semverRegex();
0 commit comments