Исправлен индекс совпадения при поиске по регулярке
This commit is contained in:
@@ -74,9 +74,9 @@ public class PatternService {
|
|||||||
found.add(FoundPattern.builder()
|
found.add(FoundPattern.builder()
|
||||||
.patternId(pattern.getId())
|
.patternId(pattern.getId())
|
||||||
.startPosition(matcher.start())
|
.startPosition(matcher.start())
|
||||||
.endPosition(matcher.end())
|
.endPosition(matcher.end() - 1)
|
||||||
.build());
|
.build());
|
||||||
startPos = matcher.end() + 1;
|
startPos = matcher.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
return found;
|
return found;
|
||||||
|
|||||||
Reference in New Issue
Block a user