Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
Python

r"
^\[[0-9]{2}-[A-Z][a-z]{2}-[0-9]{4} (?:[0-9]{2}:){2}[0-9]{2} [+|-][0-9]{4}\]: <.*> IMAP Error: Login failed for .* from (?P<host>(?:[0-9]{1,3}\.){3}[0-9]{1,3})\. AUTHENTICATE PLAIN: Authentication failed\. in /usr/share/roundcube/program/lib/Roundcube/rcube_imap\.php on line 197 \(POST /\?_task=login\?_task=login&_action=login\)$
"
gm

Description

Filter authentication fails from /var/log/roundcube/error

Submitted by Daniel Bañobre Dopico el profe - 8 years ago