- var_dump: documentation ( source)
- preg_match: documentation ( source)
<?php
$s = '/var/www/vb_dev/frontend/web/img/up/bf9b12de5ea78cecacd3dde69f2a72f8/676/6dc6c807e1cef2ba8af8e422abe77286/5/l.jpg';
preg_match('/(.*)\/img\/up\/(.*)\.jpg/', $s, $matches);
var_dump($matches);
$s = '/img/up/bf9b12de5ea78cecacd3dde69f2a72f8/676/6dc6c807e1cef2ba8af8e422abe77286/5/l.jpg';
preg_match('/(.*)\/img\/up\/(.*)\.jpg/', $s, $matches2);
var_dump($matches2);
$s = '/var/www/vb_dev/frontend/web/img/up/bf9b12de5ea78cecacd3dde69f2a72f8/676/6dc6c807e1cef2ba8af8e422abe77286/5/l.jpg';
preg_match('/(.*)\/img\/up\/(.*)\.jpg/U', $s, $matches);
var_dump($matches);
$s = '/img/up/bf9b12de5ea78cecacd3dde69f2a72f8/676/6dc6c807e1cef2ba8af8e422abe77286/5/l.jpg';
preg_match('/(.*)\/img\/up\/(.*)\.jpg/U', $s, $matches2);
var_dump($matches2);