python re with groupdict
<p>I'm writing a python code to slipt all informations from a .txt. And i have write a code, but come allways error:  <em>'NoneType' object has no attribute 'groupdict'</em></p>

<p>code:</p>

<pre><code>import re
readfile = open("test.txt")
try:
all_the_text =readfile.read()
m = re.match("(pdflink=[\w\s/]*)author=([\w\s/]*/n)",unicode(all_the_text),flags=re.UNICODE)
m.groupdict()
print m.groupdict()
finally:
readfile.close()
writefile = open('test5.txt','w')
print &gt;&gt; writefile, m.groupdict()
writefile.close()
</code></pre>

<p>Please please help me! Thx!</p>
