title: Regex to identify years from recent up to 2018
body: <p>I am using the following code to identify years in my text.</p>
  
  <pre><code>import re
  match = re.match(r'.*([1-2][0-9]{3})', text)
  print(match.group(1))
  </code></pre>
  
  <p>However, this also accepts years such as 2999, 2078 that are still not valid.</p>
  
  <p>Therefore, I would like to know how to identify years till recent in Python (i.e up to 2018).</p>