3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = '<div class="span-17"> <div class="span-17 last BottomSpacing" id="cacheDetails"> <p class="cacheImage"> </p> <h2 class="NoBottomSpacing"> <span id="ctl00_ContentBody_CacheName">Maratonska</span> </h2> <div class="minorCacheDetails Clear"> <div> In Moravskoslezsky kraj, Czech Republic </div> </div> </div> <div class="span-6 right last"> </div>'; preg_match('~<div class="minorCacheDetails Clear"> <div> (.*?) </div> </div>~', $html, $matches); echo $matches[1];
Output for 5.5.0 - 5.5.36, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.21, 7.4.0 - 7.4.10, 8.0.0alpha1 - beta3
In Moravskoslezsky kraj, Czech Republic