Python raw strings and html parsing
<p>How do python raw strings and string literals work? I'm trying to make a webscraper to download pdfs from a site. When I search the string it works, but when I try to implement it in python I always get None as my answer</p>

<pre><code>import urllib
import re    
url="" //insert url here
sock=urllib.urlopen(url)
htmlSource=sock.read();
sock.close();

m=re.match(r"&lt;a href.*?pdf[^&gt;]*?", raw(htmlSource))
print m



$ python temp.py
None
</code></pre>

<p>The raw function is from here: <a href="http://code.activestate.com/recipes/65211-convert-a-string-into-a-raw-string/" rel="nofollow">http://code.activestate.com/recipes/65211-convert-a-string-into-a-raw-string/</a></p>

<p>That said, how can I complete this program so that I can print out all of the matches and then download the pdfs?</p>

<p>Thanks!</p>
