Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
Python

r"
^(.*\[(error|warning|notice|info|debug)\].*)$
"
mg

Description

If you need to grab an entire log line based on criteria (error,warning,notice,info,debug), use this Regexp and change the parameters accordingly.

Submitted by Neill Lima - 10 years ago