mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-24 17:09:48 +00:00
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
This commit is contained in:
parent
ef02a736ca
commit
f48981f43c
@ -55,9 +55,7 @@ public final class Grok {
|
||||
"(?::(?<subname>[[:alnum:]@\\[\\]_:.-]+))?" +
|
||||
")" +
|
||||
"(?:=(?<definition>" +
|
||||
"(?:" +
|
||||
"(?:[^{}]+|\\.+)+" +
|
||||
")+" +
|
||||
")" +
|
||||
")?" + "\\}";
|
||||
private static final Regex GROK_PATTERN_REGEX = new Regex(GROK_PATTERN.getBytes(StandardCharsets.UTF_8), 0,
|
||||
|
Loading…
x
Reference in New Issue
Block a user