title: What is the difference between re.search and re.match?
body: <p>What is the difference between the <code>search()</code> and <code>match()</code> functions in the <a href="http://docs.python.org/2/library/re.html" rel="noreferrer">Python <code>re</code> module</a>?</p>
  
  <p>I've read the <a href="http://www.python.org/doc/2.5.2/lib/matching-searching.html" rel="noreferrer">documentation</a> (<a href="http://docs.python.org/2/library/re.html?highlight=matching%20searching#search-vs-match" rel="noreferrer">current documentation</a>), but I never seem to remember it.  I keep having to look it up and re-learn it.  I'm hoping that someone will answer it clearly with examples so that (perhaps) it will stick in my head.  Or at least I'll have a better place to return with my question and it will take less time to re-learn it.</p>