<?php $n = 123; $str = "some string with tt=789_ and more"; echo preg_replace("/tt=[0-9]+_\K/", $n, $str);
You have javascript disabled. You will not be able to edit any code.