title: match two patterns followed one by another
body: <p>I'm creating a calendar where users can set events and time in single line, for example:</p>
  
  <p>"6pm supper" - event with start time only</p>
  
  <p>"8:00 - 16:00 work" - event with time period</p>
  
  <p>Regex I'm currently using to get times:</p>
  
  <pre><code>[\d]{1,2}[.|:]?[\d]{0,2}[\s]?[am|pm|AM|PM]{0,2}
  </code></pre>
  
  <p>It works fine but I can't figure out how to filter out the unwanted occurrences of time if they happen, for example:</p>
  
  <p>"6pm supper at '8pm' restaurant" In this example '8pm' is a restaurant name but it will be interpreted as event with time period while it's not. I suppose I have to write a regex that will only match time pattern in the beginning of line and the next pattern that follows after it without any words between but I have no success composing such a regex so far. </p>
  
  <p>Any suggestions?</p>