3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = '</p><p><a rel="nofollow" class="external text" href="http://10.20.0.30:1234/index.php/this_is_an_example.html">How_to_sample.</a>'; $pattern = '~(?:\G|\Qhttp://10.20.0.30:1234/index.php\E[^_]+)\K_([^_.]*)~'; echo preg_replace($pattern, " $1", $input);

preferences:
67.64 ms | 404 KiB | 5 Q