Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
(\d{1,2}),(\d{1,2}\/\d{1,2}\/\d{1,2}),(\d{1,2}\:\d{1,2}\:\d{1,2}),([\w]+(\s\w+)*),((\d{1,3})(\.\d{1,3}){3})?,([\w|\.]+)?,([A-F|a-f|0-9]{12})?,(.*)
/
g

Description

This regex parses events in DHCP logs of Windows DHCP server

Submitted by anonymous - 8 years ago