Skip to content

Commit c289c9f

Browse files
committed
grepping bug
1 parent 5bcda9d commit c289c9f

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>uno.anahata</groupId>
88
<artifactId>gemini-java-client</artifactId>
9-
<version>1.0.18</version>
9+
<version>1.0.19-SNA</version>
1010
<packaging>jar</packaging>
1111

1212
<name>gemini-java-client</name>

src/main/java/uno/anahata/ai/internal/TextUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public static TextChunk processText(String text, Integer startIndex, Integer pag
4949
if (grepPattern != null && !grepPattern.trim().isEmpty()) {
5050
Pattern pattern = Pattern.compile(grepPattern);
5151
filteredLines = allLines.stream()
52-
.filter(line -> pattern.matcher(line).matches())
52+
.filter(line -> pattern.matcher(line).find()) // FIXED: Use find() instead of matches()
5353
.collect(Collectors.toList());
5454
matchingLineCountResult = filteredLines.size();
5555
} else {
@@ -143,4 +143,4 @@ public static String formatValue(Object value) {
143143
}
144144

145145
}
146-
}
146+
}

0 commit comments

Comments
 (0)