3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = ' <a href="../../../../../goods/section_2/index.html" class="pathway">Главная</a>sdfsdfsdfsdfsdfsdfsdfs dfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfs dfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdf sdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfs<div align="center" id="full_img_poln"></div>'; preg_match('#(<a href="../../../../../goods/[^/]+(?:(?!(?:<div align="center" id="full_img_poln">)).)*)<div align="center" id="full_img_poln">#isu', $html, $match ); echo '<pre>'.print_r($match[1] , 1).'</pre>';

preferences:
33.5 ms | 402 KiB | 5 Q