Regular Expressions 101

Community Patterns

1...34567...902

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
(?<date>^\d{4}-\d{2}\-\d{2}\s)(?<time>\d{2}\:\d{2}\:\d{2}\s)(?<time_taken>\d+\s)(?<c_ip>\d+\.\d+\.\d+\.\d+\s)(?<sc_status>\d+\s)(?<s_action>\w+\s)(?<sc_bytes>\d+\s)(?<cs_bytes>\d+\s)(?<cs_method>((?i)POST|(?i)GET|(?i)UNKNOWN)\s)(?<cs_uri_scheme>((http\s)|([\-\s0\/\b]+))[a-zA-Z0-9\-\+\_]+.[a-zA-Z0-9\-\+\=\_]+.[a-zA-Z0-9\-\*\+\_]*[\.a-zA-Z0-9]*\s)
/
gm

Description

no description available

Submitted by anonymous - 5 years ago