<?php $str = "it is a test string."; echo preg_replace(['~\Ar~', '~.{3}\K(?>r|.(*SKIP)(?!))~'], 'm', $str);
You have javascript disabled. You will not be able to edit any code.