Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
(\d{4}\-\d{1,2}\-\d{1,2} \d{2}:\d{2}:\d{2})(.*)(\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b)
/
gm

Description

extracts IP and Timestamp from log file for further processing.

Submitted by anonymous - 6 years ago