title: regex error - nothing to repeat
body: <p>I get an error message when I use this expression:</p>
  
  <pre><code>re.sub(r"([^\s\w])(\s*\1)+","\\1","...")
  </code></pre>
  
  <p>I checked the regex at <a href="http://regexr.com/3ctdn" rel="noreferrer">RegExr</a> and it returns <code>.</code> as expected.  But when I try it in Python I get this error message:</p>
  
  <pre><code>raise error, v # invalid expression
  sre_constants.error: nothing to repeat
  </code></pre>
  
  <p>Can someone please explain?</p>