title: preg_match validating date of birth
body: <p>I've got this so far:</p>
  
  <pre><code>$post_dob = '19/08/1982';                      
  $pattern = '/^\[0-9]{2}\/\[0-9]{2}\/\[0-9]{4}\$/';
  
  
  if(!preg_match($pattern, $post_dob)){                                
      $post_dob = explode('/', $_POST[$field]);
      $post_dob = $post_dob[2] . '-' . $post_dob[1] . '-' . $post_dob[0];  
      return $post_dob;
  }else{
      return false;
  }
  </code></pre>
  
  <p>It doesn't seem to go wrong if i put <strong>19/08/19823123</strong>
  Any ideas what I'm doing wrong?</p>