From 0a78931e1dc68f84cdec71de9b513737243dc930 Mon Sep 17 00:00:00 2001 From: Karl DeBisschop Date: Wed, 24 Jul 2024 17:29:37 -0400 Subject: [PATCH] Fix polynomial regex (#9) * Fix polynomial regex * Fix polynomial regex * Fix polynomial regex --------- Co-authored-by: Karl DeBisschop --- src/main/java/com/bioraft/rundeck/nexus/BranchOrVersion.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/bioraft/rundeck/nexus/BranchOrVersion.java b/src/main/java/com/bioraft/rundeck/nexus/BranchOrVersion.java index 6911bcb..60ff2e9 100644 --- a/src/main/java/com/bioraft/rundeck/nexus/BranchOrVersion.java +++ b/src/main/java/com/bioraft/rundeck/nexus/BranchOrVersion.java @@ -96,7 +96,7 @@ public BranchOrVersion(String path) { * Anything else is considered to be a branch. */ public boolean isVersion() { - return versionOrBranch.matches("^(v|rc)?\\d+[.]\\d+.*"); + return versionOrBranch.matches("^(v|rc)?\\d+[.]\\d+?.*+$"); } /** @@ -133,7 +133,7 @@ private String component(String path) { * string-valued. */ private String tag(String path) { - return path.replaceAll("/?[^/]*/", ""); + return path.replaceAll("/?[^/]{0,199}/", ""); } }