Regular Expression: (or not) Looking to print only data after the header
<p>Some homework help would be greatly appreciated.</p>

<p>Using socket, I need to parse data from a website (<a href="http://www.py4inf.com/code/romeo.txt" rel="nofollow">http://www.py4inf.com/code/romeo.txt</a>).</p>

<p>I'm using a regular expression '^\s*$' to locate the first blank line after the header and above the data.</p>

<p>Any tips on how to only extract the data (and not print the header)?</p>

<pre><code>import socket
import re

mysock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

try:
    userUrl = raw_input('Enter a url: ')

    d = userUrl.split('/')
    d.remove("")

    host = d[1]

    mysock.connect((host, 80))
    mysock.send('GET %s HTTP/1.0\n\n'%(userUrl))


    while True:
        data = mysock.recv(3000)
        if len(data) &lt; 1: break
        print (''.join([x for x in re.findall(**'^\s*$'**,data,re.DOTALL)]))           


except Exception as e:
    print (str(e))
</code></pre>