title: What's the difference between re.DOTALL and re.MULTILINE?
body: <p>When matching an expression on multiple lines, I always used <code>re.DOTALL</code> and it worked OK. Now I stumbled across the <code>re.MULTILINE</code> string, and it looks like it's doing the same thing.</p>
  
  <p>From the <code>re</code> module (doesn't make it clearer, but the values are different):</p>
  
  <pre><code>M = MULTILINE = sre_compile.SRE_FLAG_MULTILINE # make anchors look for newline
  S = DOTALL = sre_compile.SRE_FLAG_DOTALL # make dot match newline
  
  SRE_FLAG_MULTILINE = 8 # treat target as multiline string
  SRE_FLAG_DOTALL = 16 # treat target as a single string
  </code></pre>
  
  <p>So is there a difference in the usage, and what is the subtle cases where it could return something different?</p>