#!/usr/bin/python
import re
import sys


# Format of each line is according to the Common Log Format
# %h %l %u %t \"%r\" %>s %b
#
# We want element \"%r\" the request line from the client. 
# From the request we want the path, which is between the method and protocol.
# We need to write it out to standard output, separated by a tab

regex = '([(\d\.)]+) ([^\s]+) ([^\s]+) \[(.*?)\] "(.*?)" (\d+) (\d+|-)'

for line in sys.stdin:
    if re.match(regex, line) is not None:
        data = re.match(regex, line).groups()

        if len(data) == 7:
            print("{0}\t".format(
                data[4].split()[1].replace('http://www.the-associates.co.uk', '')
                ))

f7a0bb167871e83bfffd80d8396400c8b95ac62b
<mask token>

<mask token>
for line in sys.stdin:
    if re.match(regex, line) is not None:
        data = re.match(regex, line).groups()
        if len(data) == 7:
            print('{0}\t'.format(data[4].split()[1].replace(
                'http://www.the-associates.co.uk', '')))

<mask token>
regex = '([(\\d\\.)]+) ([^\\s]+) ([^\\s]+) \\[(.*?)\\] "(.*?)" (\\d+) (\\d+|-)'
for line in sys.stdin:
    if re.match(regex, line) is not None:
        data = re.match(regex, line).groups()
        if len(data) == 7:
            print('{0}\t'.format(data[4].split()[1].replace(
                'http://www.the-associates.co.uk', '')))

import re
import sys
regex = '([(\\d\\.)]+) ([^\\s]+) ([^\\s]+) \\[(.*?)\\] "(.*?)" (\\d+) (\\d+|-)'
for line in sys.stdin:
    if re.match(regex, line) is not None:
        data = re.match(regex, line).groups()
        if len(data) == 7:
            print('{0}\t'.format(data[4].split()[1].replace(
                'http://www.the-associates.co.uk', '')))

#!/usr/bin/python
import re
import sys


# Format of each line is according to the Common Log Format
# %h %l %u %t \"%r\" %>s %b
#
# We want element \"%r\" the request line from the client. 
# From the request we want the path, which is between the method and protocol.
# We need to write it out to standard output, separated by a tab

regex = '([(\d\.)]+) ([^\s]+) ([^\s]+) \[(.*?)\] "(.*?)" (\d+) (\d+|-)'

for line in sys.stdin:
    if re.match(regex, line) is not None:
        data = re.match(regex, line).groups()

        if len(data) == 7:
            print("{0}\t".format(
                data[4].split()[1].replace('http://www.the-associates.co.uk', '')
                ))
