We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2cd0d76 commit 0906908Copy full SHA for 0906908
1 file changed
src/main/java/org/spdx/utility/compare/TemplateRegexMatcher.java
@@ -326,8 +326,10 @@ public String normalizeText(String text) {
326
startIndex = startMatcher.start();
327
Pattern endPattern = Pattern.compile(getEndRegex(WORD_LIMIT));
328
Matcher endMatcher = endPattern.matcher(compareText);
329
- if (endMatcher.find()) {
+ while (endMatcher.find() && endMatcher.start() >= startIndex) {
330
endIndex = endMatcher.end();
331
+ }
332
+ if (endIndex > 0) {
333
result = compareText.substring(startIndex, endIndex);
334
}
335
0 commit comments