fork download
  1. <?php
  2.  
  3. $str = 'b_image|2016-12/1482336033_slider_1.png||poster|2016-11/1480498514_poster_1.png||screenshots|2016-11/1480498459_photo_1.png';
  4.  
  5. preg_match_all('/poster\|(.*)\|/U', $str, $matches);
  6.  
  7. // Print the entire match result
  8. print_r($matches);
Success #stdin #stdout 0.01s 52488KB
stdin
Standard input is empty
stdout
Array
(
    [0] => Array
        (
            [0] => poster|2016-11/1480498514_poster_1.png|
        )

    [1] => Array
        (
            [0] => 2016-11/1480498514_poster_1.png
        )

)