Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complete RegExp to verify version numbers #279

Closed
rugk opened this issue Nov 3, 2015 · 7 comments
Closed

Complete RegExp to verify version numbers #279

rugk opened this issue Nov 3, 2015 · 7 comments

Comments

@rugk
Copy link

rugk commented Nov 3, 2015

Can we possibly have a full regular expression which can be used to formally verify version numbers according to the spec?
Possibly publish them at https://regex101.com/, because there you can later change (and versionize 馃槈) it.

This would also allow RegExp pros to just look at this RegExp and get the main ideas how to use semantic verison numbers.

@rugk
Copy link
Author

rugk commented Nov 3, 2015

This would also prevent such questions: #271
Because you can easily check it by yourself. 馃槂

@DavidFichtmueller
Copy link

Take a look at #232 or #266 (comment) (this one is better). I hope this helps.
I think this should be part of the specification as well.

@rugk
Copy link
Author

rugk commented Nov 3, 2015

I also saw #32 and semver/semver.org#59 which have some ideas there.

So I still leave this issue open for adding this to the spec and which would allow keeping the RegExp updated as I found many outdated RegExp in the issues you and I linked to.

@FichteFoll
Copy link

Note that because of ambiguity in #181 we are currently unable to construct an exact regular expression, although the unpublished BNF suggests a solution.

@rugk
Copy link
Author

rugk commented Nov 3, 2015

As far as I understand here is a RegExp which respects the loading zeros convention.
So do you mean this with BNF or what else?

Edit: Okay, found out what the BNF is. So actually you want to automatically create a RegExp out of the BNF, whcih is currently not seem possible, because the leading zeros part is missing in the BNF:

@FichteFoll
Copy link

No, in the initial post of #181 it is explained that the spec would be ambiguous whether digits-only identifiers with leading zeros make a valid semantic version. I just came to the conclusion that it's in fact not ambiguous, so you can ignore my comment.

@haacked
Copy link
Contributor

haacked commented Aug 5, 2016

Closing this in lieu of semver/semver.org#59

@haacked haacked closed this as completed Aug 5, 2016
qub1750ul pushed a commit to qub1750ul/versioning that referenced this issue Jul 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants