title: Regular Expression in Java: Pattern.compile( "J.*\\d[0-35-9]-\\d\\d-\\d\\d" )
body: <p>I found a code in Java Regular expression which is confusing to me:</p>
  
  <pre><code>Pattern.compile( "J.*\\d[0-35-9]-\\d\\d-\\d\\d" );
  </code></pre>
  
  <p>The string to be compiled is:</p>
  
  <pre><code>String string1 = "Jane's Birthday is 05-12-75\n" + "Dave's Birthday is 11-04-68\n" + "John's Birthday is 04-28-73\n" + "Joe's Birthday is 12-17-77";
  </code></pre>
  
  <p>What does it mean by the </p>
  
  <pre><code>[0-35-9]
  </code></pre>
  
  <p>And why there are 4 "\d"s instead of 3? I assume there are only 3 numbers in the birthday.</p>