Skip to content

Commit 9e7cfc8

Browse files
authored
Remove redundant nested operator in builtin grok expression. (#47870)
This prevents the following warning from being printed to console: `regular expression has redundant nested repeat operator + /%\{(?<name>(?<pattern>[A-z0-9]+)(?::(?<subname>[[:alnum:]@\[\]_:.-]+))?)(?:=(?<definition>(?:(?:[^{}]+|\.+)+)+))?\}/` The current grok expression is not failing, but just this warning is being printed. The warning started being printed after upgrading joni (#47374). Closes #47861
1 parent d308095 commit 9e7cfc8

File tree

1 file changed

+0
-2
lines changed
  • libs/grok/src/main/java/org/elasticsearch/grok

1 file changed

+0
-2
lines changed

libs/grok/src/main/java/org/elasticsearch/grok/Grok.java

-2
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ public final class Grok {
5454
"(?::(?<subname>[[:alnum:]@\\[\\]_:.-]+))?" +
5555
")" +
5656
"(?:=(?<definition>" +
57-
"(?:" +
5857
"(?:[^{}]+|\\.+)+" +
59-
")+" +
6058
")" +
6159
")?" + "\\}";
6260
private static final Regex GROK_PATTERN_REGEX = new Regex(GROK_PATTERN.getBytes(StandardCharsets.UTF_8), 0,

0 commit comments

Comments
 (0)