<?php preg_match('^catalog\\/[a-zA-Z0-9_\-\.]\\/.*$', 'catalog/bisque/mayco/samples/mayco_mb1211_0.jpg', $matches); $directory = $matches[0] ?? ''; var_dump($directory);
You have javascript disabled. You will not be able to edit any code.