fix: preserve commas inside regex grouping when splitting filter patterns (#5588)
AviaterRegexFilter#init splits the configured pattern on every comma to
separate multiple regular expressions. That blindly breaks regex
quantifiers such as \d{1,2} or non-capturing alternations like
(a,b|c) because the comma inside the grouping construct is treated as
a top-level separator.
Replace the StringUtils.split call with a parse-aware splitter that
tracks the depth of {}, [], () and respects backslash escapes, so only
top-level commas separate patterns. Apply the change to both copies of
AviaterRegexFilter (filter module and connector/core module).
Add AviaterFilterTest#test_regex_with_quantifier_comma covering: a
single-pattern \d{1,2} quantifier, a multi-pattern list combined with
\d{1,2}, and an open-ended {n,} quantifier.
Fixes #5442 G
Guimu committed
cf628769d645f5f97f3006e085a86cd57b8a1ab9
Parent: cf97b2a
Committed by GitHub <noreply@github.com>
on 5/29/2026, 2:39:04 AM