title: What's the regular expression that matches a square bracket? (Part II)
body: <p>This is a continuation of the <a href="https://stackoverflow.com/questions/928072/whats-the-regular-expression-that-matches-a-square-bracket">previous thread</a> because none of the answers there produced the intended result. I am getting super wierd behavior using regexes to match dates. I want to match the following dates:</p>
  
  <pre><code>[month-day]
  </code></pre>
  
  <p>Such as:</p>
  
  <pre><code>"[01-23]" // January 23rd is a valid date
  "[02-31]" // February 31st is an invalid date
  "[02-16]" // valid
  "[ 6-03]" // invalid format
  </code></pre>
  
  <p>Here is my regex:</p>
  
  <pre><code>regex = /\[^[0-1][1-9]\-[0-3][0-9]\]/
  </code></pre>
  
  <p>I tried to put both a single <code>\</code> and double <code>\</code> infront of brackets but nothing seems to be working for matching these dates. Any ideas?</p>
  
  <p>Thanks!</p>