Исправлен хэш UA

This commit is contained in:
serega6531
2019-11-27 00:30:17 +03:00
parent 98a5eddd0a
commit 1d32f49a1d
4 changed files with 6 additions and 9 deletions

View File

@@ -68,13 +68,15 @@ public class PatternService {
String content = new String(bytes);
final java.util.regex.Pattern regex = compilePattern(pattern);
final Matcher matcher = regex.matcher(content);
int startPos = 0;
while (matcher.find()) {
while (matcher.find(startPos)) {
found.add(FoundPattern.builder()
.patternId(pattern.getId())
.startPosition(matcher.start())
.endPosition(matcher.end())
.build());
startPos = matcher.end() + 1;
}
return found;