MultiLine Pattern

How to Write Multiline Patter to Pick the Multiple Lines between =-=-=-=-=-=- as single Message or record, the log i want to parse looks like this

@83500bcd6348a4be6df4 The best way to tests for a multiline pattern is to use a go playground.

I've tested your original data, you could use the pattern = =-=-=-=-=-=-=-=- and set negate option to true.

You can see the code and the result there

Can i do the same in c++ , c# or maybe python ? if so where can i look for its documentation ?

Since Filebeat is written in go we don't have a specific example in other languages.
But the regular expression is using the RE2 syntax and you can see all the details at our doc page at https://www.elastic.co/guide/en/beats/filebeat/current/regexp-support.html or the official golang doc at https://github.com/google/re2/wiki/Syntax.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.