Regular Expressions 101

Library entries

Parse parts of fail2ban log

Vote

1

Regular Expression
pcre

/
^(?:[^\[\n]*\[){2}(?P<jail>[^\]]+)\]\s+(?P<action>(Restore Ban|\w+))\s+(?P<source_ip>[^ ]+)
/
gm

Description

Loading markdown...
Submitted by anonymous - a year ago