3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '<h1>Oude tekst hier</h1>'; $search = "/[^<h1>](.*)[^<\/h1>]/"; $replace = "Here my new text"; $content = preg_replace($search,$replace,$string); echo $content;

preferences:
64.35 ms | 404 KiB | 5 Q