title: matching unicode characters in python regular expressions
body: <p>I have read thru the other questions at Stackoverflow, but still no closer. Sorry, if this is allready answered, but I didn`t get anything proposed there to work.</p>
  
  <pre><code>&gt;&gt;&gt; import re
  &gt;&gt;&gt; m = re.match(r'^/by_tag/(?P&lt;tag&gt;\w+)/(?P&lt;filename&gt;(\w|[.,!#%{}()@])+)$', '/by_tag/xmas/xmas1.jpg')
  &gt;&gt;&gt; print m.groupdict()
  {'tag': 'xmas', 'filename': 'xmas1.jpg'}
  </code></pre>
  
  <p>All is well, then I try something with Norwegian characters in it ( or something more unicode-like ):</p>
  
  <pre><code>&gt;&gt;&gt; m = re.match(r'^/by_tag/(?P&lt;tag&gt;\w+)/(?P&lt;filename&gt;(\w|[.,!#%{}()@])+)$', '/by_tag/påske/øyfjell.jpg')
  &gt;&gt;&gt; print m.groupdict()
  Traceback (most recent call last):
  File "&lt;interactive input&gt;", line 1, in &lt;module&gt;
  AttributeError: 'NoneType' object has no attribute 'groupdict'
  </code></pre>
  
  <p>How can I match typical unicode characters, like øæå? I`d like to be able to match those characters as well, in both the tag-group above and the one for filename.</p>