summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-08-02 02:24:02 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-08-02 02:24:02 -0400
commita15a2c5d092ca4608e8b85520443aae39063a11f (patch)
treefd0c43d165c0b90167576e33e1e7b8f03df5cbd6
parent937750f10085840a0b0c84da516c7544594c812b (diff)
downloadSMAPI-a15a2c5d092ca4608e8b85520443aae39063a11f.tar.gz
SMAPI-a15a2c5d092ca4608e8b85520443aae39063a11f.tar.bz2
SMAPI-a15a2c5d092ca4608e8b85520443aae39063a11f.zip
tweak semantic version regex to fix unnecessary capturing groups
-rw-r--r--src/StardewModdingAPI/SemanticVersion.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/StardewModdingAPI/SemanticVersion.cs b/src/StardewModdingAPI/SemanticVersion.cs
index 782a962b..58f24503 100644
--- a/src/StardewModdingAPI/SemanticVersion.cs
+++ b/src/StardewModdingAPI/SemanticVersion.cs
@@ -17,7 +17,7 @@ namespace StardewModdingAPI
/// - allows hyphens in prerelease tags as synonyms for dots (like "-unofficial-update.3");
/// - doesn't allow '+build' suffixes.
/// </remarks>
- private static readonly Regex Regex = new Regex(@"^(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)(\.(?<patch>0|[1-9]\d*))?(?:-(?<prerelease>([a-z0-9]+[\-\.]?)+))?$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase | RegexOptions.Compiled | RegexOptions.ExplicitCapture);
+ private static readonly Regex Regex = new Regex(@"^(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)(?:\.(?<patch>0|[1-9]\d*))?(?:-(?<prerelease>(?:[a-z0-9]+[\-\.]?)+))?$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase | RegexOptions.Compiled | RegexOptions.ExplicitCapture);
/*********