title: Regex to extract two dates out of a date range
body: <p>I have a date range and I want to extract the two dates, this is an example string:</p>
  
  <pre><code>Sep 25-28, 2016
  </code></pre>
  
  <p>and I'd like to have two regular expressions, one that matches:</p>
  
  <pre><code>Sep 25, 2016
  </code></pre>
  
  <p>and the other that matches:</p>
  
  <pre><code>Sep 28, 2016
  </code></pre>
  
  <p>But then I'd like that also matches:</p>
  
  <pre><code>Sep 29-Oct 2, 2016
  </code></pre>
  
  <p>This is what I have built so far:</p>
  
  <pre><code>(?P&lt;date&gt;\b(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec|[0-9]|1[0-2]) (\d|[0-2][0-9]|3[0-1])(\s|\.|-)(:?\d|[0-2][0-9]|3[0-1]),?(\s|\.|-)\b\d{1,4}\b)
  </code></pre>
  
  <p>But of course matches the whole range.</p>
  
  <p>Any help?</p>