A regular expression is a pattern language for validating or extracting text and for matching Fluent Bit event tags more precisely than wildcarding. It can route warnings, errors, or tenant-specific events to the appropriate processing path. section 6.2 section 7.5.3
Use regex deliberately in operational pipelines:
- Match a bounded set of tag forms, such as myTag.error, myTag.warn, and numeric variants, with one expression. section 7.5.3
- Prefer simpler wildcard matching when it provides the required behavior, because regex execution can consume significant compute across all pipeline events. section 7.5.3
- Document assumptions or split complex expressions into steps so unexpected log content and future maintenance do not break processing silently. section 7.5.3
- Test parser expressions against malformed records: an invalid expression can terminate Fluent Bit, while malformed input can stop parsing and leave payload data unprocessed. section 6.8.2
Match selected Fluent Bit tags
In an output configuration, match_regex myTag.(error|warn|1|2) routes events tagged myTag.error, myTag.warn, myTag.1, or myTag.2 to stdout while excluding other tags. The accompanying test inputs demonstrate matching error, warning, and numeric-code events.


























