3v4l.org

run code in 300+ PHP versions simultaneously
<?php $inputext = "school of engineering, school of medicine"; $rule ="/(?<=school of )\w+/"; $replacetext = "education"; $outputext = preg_replace($rule, $replacetext, $inputext); echo($outputext);

preferences:
40.43 ms | 404 KiB | 5 Q