title: Extract year from a string using PHP regex
body: <p>I want to extract year from a string. I got an incomplete solution. My string will be always like:</p>
  
  <blockquote>
    <p>Please message mpg of jazz 2014 and 2015+ to my mobile number 
    +123456789</p>
  </blockquote>
  
  <p>I have tried the following regex;</p>
  
  <pre><code>preg_match_all('!\d{4}+| \d{4}+\W!', $str, $matches);
  </code></pre>
  
  <p>This will output the following array. </p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [0] =&gt;  2015 
              [1] =&gt;  2014+
              [2] =&gt; 1234
              [3] =&gt; 5678
          )
  
  )
  </code></pre>
  
  <p>I need to get only the year portion with + symbol if any. I.e, i want only this: </p>
  
  <pre><code>Array
      (
          [0] =&gt; Array
              (
                  [0] =&gt;  2015 
                  [1] =&gt;  2014+                
              )
  
      )
  </code></pre>