title: Javascript Regular Expression to validate date
body: <p>I am rather unfamiliar with regular expressions.  I am trying to write a regular expression for mm.dd.yyyy, mm/dd/yyyy or mm-dd-yyyy.  This is what I have so far, I am completely unsure if I am even close.</p>
  
  <pre><code>^[0-9]{4}-(((0[13578]|(10|12))-(0[1-9]|[1-2][0-9]|3[0-1]))|(02-(0[1-9]|[1-2][0-9]))|((0[469]|11)-(0[1-9]|[1-2][0-9]|30)))$
  </code></pre>
  
  <p>Thanks</p>