Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
r"
SRC=(?P<src_ip>[\d\.]*).*?PROTO=(?P<proto>\w*).*?(SPT=(?P<src_port>\d*).*?DPT=(?P<dst_port>\d*)|TYPE=(?P<icmp_type>\d*).*?CODE=(?P<icmp_code>\d*))
"
g
Input 1
1
New
<4>Nov 25 12:00:13 ubuntu kernel: [ 574.036758] iptableslogIN=enp0s3 OUT= MAC=44:85:00:ec:eb:2b:00:21:55:ef:8c:7f:08:00 SRC=10.24.136.232 DST=10.23.85.76 LEN=44 TOS=0x00 PREC=0x00 TTL=52 ID=5250 PROTO=TCP SPT=56325 DPT=55 WINDOW=1024 RES=0x00 SYN URGP=0