<?php $inputext = "school of engineering, school of medicine"; $rule ="/(?<=school of )\w+/"; $replacetext = "education"; $outputext = preg_replace($rule, $replacetext, $inputext); echo($outputext);
You have javascript disabled. You will not be able to edit any code.