<?PHP
    header('Content-Type: text/plain; charset=utf8');
    $regexPattern = "/([a-z]+ [0-9]{4})/i"; //This will match a letters + space + 4 digit number together
    $inputString = "juny 2014 october 2014 february 2016 march 2017 july 2010 FEBRUARY 2014";
    $matchCount = preg_match_all($regexPattern, $inputString, $matches);
    print_r($matches);
?>