Changes

Jump to: navigation, search

OPS435 Python Assignment 1 2017 - 3

104 bytes added, 10:32, 4 October 2017
Successful requests menu
<source>109.86.167.47 - - [29/Aug/2017:10:22:49 -0400] "GET /isomaster/releases/isomaster-1.3.13.tar.bz2 HTTP/1.1" 200 245085 "http://littlesvr.ca/isomaster/download/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0"</source>
You should use the Python <b>re</b> module, look [https://docs.python.org/3/library/re.html here] for documentation, you should probably use [https://docs.python.org/3/library/re.html#re.match.group match() and group()]. You may use the following regular expression to extract the components from each line:
<source>([(\d\.)]+) - - \[(.*?)\] "(.*?)" (\d+) ((\d+)|-).*</source>

Navigation menu