Regular Expressions 101

Community Patterns

apache log parser

1

Regular Expression
Python

r"
(?P<remote>[\.0-9]+) (?P<identity>[\w\d\-]+) (?P<user>[\w\d\-]+) \[(?P<date>.*?)\] "(?P<method>\w+) (?P<url>.*?) (?P<protocol>[\w\/\.\d]+)" (?P<status>\d+) (?P<bytes>[\d-]+) "(?P<referer>.*?)" "(?P<agent>.*?)"
"

Description

no description available

Submitted by Claudio Borges - 8 years ago