Skip to content

First field not returning after Positive lookahead  #10

Description

@andrerfurtado

Grok Pattern: (?=.*banana)(?<a>.*) (?<b>.*) (?<c>.*)
Samples:
banana abacate cenoura
abacate banana melao
melancia pera uva

Expected output with fields a, b and c, first two lines match.

Actual output:
[ { "a": "abacate", "b": "cenoura" }, { "a": "banana", "b": "melao" }, null ]

regex101: https://regex101.com/r/1JPzBu/1

when this pattern is used with grok exporter (https://github.com/fstab/grok_exporter) the output is as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions