title: sre_constants.error: nothing to repeat
body: <p>I am using a regex and I get the error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "tokennet.py", line 825, in &lt;module&gt;
      RunIt(ContentToRun,Content[0])
    File "tokennet.py", line 401, in RunIt
       if re.search(r'\b'+word+r'\b', str1) and re.search(r'\b'+otherWord+r'\b',   str1) and word != otherWord:
     File     "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.py",     line 142, in search
       return _compile(pattern, flags).search(string)
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.py", line 242, in _compile
  raise error, v # invalid expression
  sre_constants.error: nothing to repeat
  </code></pre>
  
  <p>I've looked around, and it seems this error is associated with <code>*</code>, but not sure why I'm getting it. What do I have to do to <code>str1</code> to stop getting it? <code>str1</code> is one line in a massive text file, and when I print <code>str1</code> to see what line in particular is bugging, it looks like a normal line... </p>