title: Regular Expression of a specific Date format
body: <p>I need help in forming a regular expression of a date to match YYYYMMDD format. Below are the details:</p>
  
  <p>Input Validation:  The value entered is length of 8 and all numeric.  The
  first character is a 1 or 2.  The 5th &amp; 6th character are between 01 and 12,
  the last two characters are between 01 and 31</p>
  
  <p>I tried it below expression but cannot understand how we can provide the value ranges like 1-12 for months and 1-31 for days.</p>
  
  <pre><code>SELECT 'P' from dual where REGEXP_LIKE ('122412','^[1][2][0-9]{2}[1|12]$');
  </code></pre>
  
  <p>Thanks in advance!</p>