aboutsummaryrefslogtreecommitdiffstats
path: root/api/src/main/java/org/semver
diff options
context:
space:
mode:
Diffstat (limited to 'api/src/main/java/org/semver')
-rwxr-xr-xapi/src/main/java/org/semver/Version.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/api/src/main/java/org/semver/Version.java b/api/src/main/java/org/semver/Version.java
index 1a1b501..a6871b5 100755
--- a/api/src/main/java/org/semver/Version.java
+++ b/api/src/main/java/org/semver/Version.java
@@ -32,7 +32,7 @@ import javax.annotation.concurrent.Immutable;
*/
@Immutable
public final class Version implements Comparable<Version> {
-
+
/**
* {@link Version} element. From most meaningful to less meaningful.
*/
@@ -40,7 +40,7 @@ public final class Version implements Comparable<Version> {
MAJOR, MINOR, PATCH, SPECIAL;
}
- private static final String FORMAT = "(\\d)\\.(\\d)(?:\\.)?(\\d)?(?:\\.|-)?([A-Za-z][0-9A-Za-z-]*)?";
+ private static final String FORMAT = "(\\d)+\\.(\\d)+(?:\\.)?(\\d)*(?:\\.|-)?([A-Za-z][0-9A-Za-z-]*)?";
private static final Pattern PATTERN = Pattern.compile(Version.FORMAT);
private static final String SNAPSHOT_VERSION_SUFFIX = "-SNAPSHOT";