Skip to content

Commit

Permalink
Merge pull request #37 from TommasoPieroncini/disallow-leading-zeroes…
Browse files Browse the repository at this point in the history
…-xyz

Disallow leading zeroes for major, minor, patch
  • Loading branch information
adamreeve authored Jul 22, 2018
2 parents 4890b46 + 3853437 commit bf6b029
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/SemVer/Version.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ public class Version : IComparable<Version>, IEquatable<Version>

private static Regex strictRegex = new Regex(@"^
\s*v?
(\d+) # major version
([0-9]|[1-9][0-9]+) # major version
\.
(\d+) # minor version
([0-9]|[1-9][0-9]+) # minor version
\.
(\d+) # patch version
([0-9]|[1-9][0-9]+) # patch version
(\-([0-9A-Za-z\-\.]+))? # pre-release version
(\+([0-9A-Za-z\-\.]+))? # build metadata
\s*
Expand Down

0 comments on commit bf6b029

Please sign in to comment.