diff --git a/differences/dometahierarchy.groovy b/differences/dometahierarchy.groovy index a58c02e..583c7f1 100644 --- a/differences/dometahierarchy.groovy +++ b/differences/dometahierarchy.groovy @@ -116,9 +116,11 @@ def getgitlogdifferences(String gitrootfolder, String earlyrevision, String late def extractsha(String line) { def pattern = ~"^(\\p{XDigit}*) (.*)" + def match = (line =~ pattern) + match.find() - def sha = line.replaceFirst(pattern) { _, shabit, therest -> "${shabit}" } - def restofline = line.replaceFirst(pattern) { _, shabit, therest -> "${therest}" } + def sha = match.group(1) + def restofline = match.group(2) echo "Sha filtering: line: ${line} sha: ${sha} therest: ${restofline}"