3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "<li>Want this</li>DON'T WANT THIS<li>Want this</li>DON'T WANT THIS<li>Want this</li>"; preg_match_all('/<li>(.*?)<\/li>/', $str, $out); echo '<pre>'; print_r($out);

preferences:
86.71 ms | 402 KiB | 5 Q