title: Python regex matching when it should not
body: <p>I have a list of strings and I want to print out the ones that don't match the regex but I'm having some trouble. The regex seems to match strings that it should not, if there is a substring that starts at the beginning of the string that matches the regex.  I'm not sure how to fix this.</p>
  
  <p>Example</p>
  
  <pre><code>&gt;&gt;&gt; import re
  &gt;&gt;&gt; pattern = re.compile(r'\d+')
  &gt;&gt;&gt; string = u"1+*"
  &gt;&gt;&gt; bool(pattern.match(string))
  True
  </code></pre>
  
  <p>I get true because of the <code>1</code> at the start.  How should I change my regex to account for this?</p>
  
  <p>Note I'm on python 2.6.6</p>