title: Shouldn't "static" patterns always be static?
body: <p>I just found a bug in some code I didn't write and I'm a bit surprised:</p>
  
  <pre><code>Pattern pattern = Pattern.compile("\\d{1,2}.\\d{1,2}.\\d{4}");
  Matcher matcher = pattern.matcher(s);
  </code></pre>
  
  <p>Despite the fact that this code fails badly on input data we get <em>(because it tries to find dates in the 17.01.2011 format and gets back things like 10396/2011 and then crashed because it can't parse the date but that <strong>really</strong> ain't the point of this question ; )</em> I wonder:</p>
  
  <ul>
  <li><p>isn't one of the point of <em>Pattern.compile</em> to be a speed optimization (by pre-compiling regexps)?</p></li>
  <li><p>shouldn't all "static" pattern be <strong>always</strong> compiled into static pattern?</p></li>
  </ul>
  
  <p>There are so many examples, all around the web, where the same pattern is always recompiled using <em>Pattern.compile</em> that I begin to wonder if I'm seeing things or not.</p>
  
  <p>Isn't (assuming that the string is static and hence not dynamically constructed):</p>
  
  <pre><code>static Pattern pattern = Pattern.compile("\\d{1,2}.\\d{1,2}.\\d{4}");
  </code></pre>
  
  <p>always preferrable over a non-static pattern reference?</p>