A small Go application to test a multi-line regex to be used with the filebeat multiline config option
Run make build in the root of this application repository.
-f: File containing multi-line string to test (default: "")-n: Negate the pattern matching (default: true)-p: Multi-line regex pattern to use for the matching (default: "")-y: Specify a filebeat prospector yaml config, which overrides the-f,-n, and-pflags (default: "")-v: Prints current version and exits
./multiline-test -p "^=[A-Z]+|^$" -f teststring.txt
This code base is a adaptation of the code sample which Elastic provides as a testing mechanism within the Go Playground.
https://play.golang.org/p/uAd5XHxscu
Coverted under the MIT license.