title: "Empty" interval quantifiers in Java Pattern class
body: <p>In Java <code>Pattern</code> class, the expressions with quantifier alone, like <code>+</code> or additional quantifiers, like <code>a++++</code> are not allowed, and both cases will throw a exception (because of dangling meta character). However <code>Pattern</code> class allows to use a interval quantifier alone (<code>{1}</code>,<code>{2,6}</code>) which will match empty spaces between characters. What's more number in interval doesn't matter, so the <code>{1}</code> and <code>{99999}</code> will match alike, which maybe is reasonable (as infinite "nothing" could fit in same space), but could be misleading. In effect regular expressions like:</p>
  
  <pre><code>a{2}
  a{2}{34}{9999,99999}
  a{2}{45}
  a{2}+{234}+{9,999999999}?
  </code></pre>
  
  <p>are valid patterns, and will match exactly the same. So in effect it is an useless feature.</p>
  
  <p>In most of regex flavours, with exception of Ruby as far as I know, such usage of interval is not allowed. The quantifiers of both types are treated equally, and must be preceded by quantifiable element to create valid pattern.</p>
  
  <p><br>What reason is behind such solution in <code>Pattern</code> class?
  Is it just a bug? engine difference? Why treat an interval differently than other quantifiers?</p>