title: Regular Expression Help for Date Validation - dd/mm/yyyy - PHP
body: <p>Can someone show me the error of my ways when it comes to this regular expression:</p>
  
  <pre><code>if(preg_match("/^[0-9]{1,2}/[0-9]{1,2}/[0-9]{4}$/", $_POST["date"]) === 0) {
     echo 'error';
  }
  </code></pre>
  
  <p>Basically I want this to display an error message each time - unless the format is correct (dd/mm/yyyy).</p>
  
  <p>What am I doing wrong with the above?</p>
  
  <p>Many thanks for any pointers.</p>
  
  <p><strong>-- updated regex above shortly after posting - apologies for inconvenience --</strong></p>