Regular Expressions 101

Community Patterns

Captures entire log line that meet the criteria

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