fork(2) download
  1. <?php
  2.  
  3. $re = '~(?:0[1-9]|1[0-2])/[0-9]{4}~';
  4. $str = "03/201408/201511/201203/201408/201511/201203/201408/201511/2012";
  5. preg_match_all($re, $str, $matches);
  6. print_r($matches[0]);
Success #stdin #stdout 0.02s 52472KB
stdin
Standard input is empty
stdout
Array
(
    [0] => 03/2014
    [1] => 08/2015
    [2] => 11/2012
    [3] => 03/2014
    [4] => 08/2015
    [5] => 11/2012
    [6] => 03/2014
    [7] => 08/2015
    [8] => 11/2012
)