Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Golang

`
(?P<timestamp>\d{2}\/\d{2}\/\d{4}\s+\d{2}\:\d{2}\:\d{2}\.\d{1,4}\s*\+\d{2}\:\d{2})\s*-\s*\[(?P<severity>[A-Z]+)\]\s*-\s*\[(?P<subsystem>[^\]]+)\]\s*-\s*(?P<message>.*)
`

Description

extract time stamp from log entry

Submitted by anonymous - 2 years ago