Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
(?<Date>\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2})\s+(?<Type>\w+)\s\((?<Thread>[^\r\n]*)\)\s\[(?<Component>[^\r\n]*)]\s+(?<Message>[^\r\n]*)
/
mg

Description

Break down home assistant into parts so that pimp-my-log can understand it

Submitted by anonymous - 6 years ago