Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Created·2022-04-21 01:59
Flavor·Golang

`
^(?s)(?P<time>\S+?) (?P<stream>stdout|stderr) (?P<flags>\S+?) (?P<content>.*)$
`
gms
Open regex in editor

Description

The CRI expr will match and parse log lines of this format:

2019-01-01T01:00:00.000000001Z stderr P some log message
Submitted by east4ming