3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $test=["abcd/abcd_.mp3", "abcd", "asdasd/abcd.mp3", "abcd."]; foreach ($test as $t) echo preg_replace("/abcd([^_.])/", "defg" . "\${1}", $t);