<?php $string = "222\t55555\t9\thello\tbyebye\t444"; $newInt = 2; var_export( preg_replace("/\t[^\t]+\t\K\d+/", $newInt, $string, 1) );
You have javascript disabled. You will not be able to edit any code.