title: RegEx: Match "year:2012" anywhere in a string?
body: <p>I'm working on a search engine, and i need the user to be able to filter the results by year. I want the user to be able to add "year:(four digits)" anywhere in the search string. I created this but it's not quite what i want:</p>
  
  <pre><code>(year\:\d{4})
  </code></pre>
  
  <p>It does indeed match what i need, but i only want to match if there is either whitespace or nothing next to it. Right now, it matches even if it's in the middle of a word.</p>
  
  <p>Examples:</p>
  
  <pre><code>testyear:2012test - Don't want match
  test year:2012test - Don't want match
  test year:2012 test - DO want match
  test year:2012 - DO want match
  </code></pre>
  
  <p>Any ideas?</p>