Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
(?P<time>\d{4}-\d{2}-\d{2}\s*\d{2}:\d{2}:\d{2})\s*(?P<user>[^\s]*)\s*(?P<url>[^\s]+)\s*(?|(?P<log_msg>.*)\s*(?P<stack_trace>Stack trace:.*)|(?P<log_msg>.*))
/
g

Description

no description available

Submitted by anonymous - 8 years ago