title: how to validate date format using regular expression
body: <p>I want to verify if the date provided is in the correct format. It doesn't matter if the date is correct or not. I am only interested in the format. And, I don't how to handle it. Here is the regular expression that I am using</p>
  
  <p>My complete expression is .+(\b[0-9]?\b).+(\d{2}/\d{2}/\d{4})</p>
  
  <p>but the date part is </p>
  
  <p>(\d{2}/\d{2}/\d{4})</p>
  
  <p>This works good if the date is 07/02/2011 but it doesn't work if the date is 7/2/2011</p>
  
  <p>I tried (\d{1-2}/\d{1-2}/\d{4})</p>
  
  <p>but that didn't help.</p>