3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $cool ='<li><span class="sidebar-vote-number"><a href="/story.php?title=gamestarts now">1</a></span><span class="sidebar-article"><a href="/story.php?title=googlegoogle-google-google" class="switchurl">GoogleGoogle Google Google</a></span></li> Published News</a></div> </div> <div class="boxcontent"> <ul class="sidebar-stories"> <li><span class="sidebar-vote-number"><a href="/story.php?title=googlegoogle-google-google">1</a></span><span class="sidebar-article"><a href="/story.php?title=googlegoogle-google-google" class="switchurl">GoogleGoogle Google Google</a></span></li>'; preg_match('~<li><span class="sidebar-vote-number"><a href="([^"]*)~', $cool, $match); var_dump($match);
Output for 4.3.0 - 5.6.21, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(2) { [0]=> string(78) "<li><span class="sidebar-vote-number"><a href="/story.php?title=gamestarts now" [1]=> string(31) "/story.php?title=gamestarts now" }