3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '@<!CDATA\[.*?/\K\w+\.\jpg(?=\]\])@'; $str = '<!CDATA[/2018/08/hello.jpg]]><!CDATA[/2018/08/another.jpg]]>'; preg_match_all($re, $str, $matches); print_r($matches[0]);

preferences:
29.96 ms | 405 KiB | 5 Q