Regular Expressions 101

Library entries

SSHD log analysis

Vote

0

Regular Expression
python

"
\[(?P<ssh_id>\d{1,}(?=\])).*(?P<action>(Accepted)|(Failed)).+(?P<username>(?<=(for\s)).+(?=\sfrom)).+(?P<host>(?<=(from\s)).+(?=\sport)).+(?P<port>(?<=(port\s))\d{1,})
"
g

Description

Loading markdown...
Submitted by Xerath Ahbrosha - 5 years ago