Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
\s+(?P<tst_dvc>[^\s]+)\s+\w{3}\s+\d{1,2}\s+\d{2}\:\d{2}\:\d{2}\s(?P<tst_cmd>[^:]+):\s+(?P<tst_action>[^\s]+)\s+<\d>(?P<tst_action2>[^\s]+)\s+IN=(?P<tst_in_if>[^\s]+)\s+OUT=(?P<tst_out_if>[^\s]+)\s+<\d>(?P<tst_src_ip>[^\s]+)\s+DST=(?P<tst_dest_ip>[^\s]+)\s+<\d>LEN=(?P<tst_len>[^\s]+)\s+TOS=(?P<tst_tos>[^\s]+)\s+PREC=(?P<tst_prec>[^\s]+)\s+TTL=(?P<tst_ttl>[^\s]+)\s+ID=(?P<tst_id>[^\s]+)\s+(DF\s+|\s+)PROTO=(?P<tst_proto>[^\s]+)\s+<\d>SPT=(?P<tst_src_port>[^\s]+)\s+DPT=(?P<tst_dest_port>[^\s]+)\s+
/
g

Description

no description available

Submitted by gs - 8 years ago