preg_replace('/Hello/', 'Hi', $text) // вот вам замена. И что?
/(Hello) (human)/
$string = str_replace(['Hello', 'human'], ['Hi', 'dude'], $string)
preg_replace('/Hello/', 'Hi, $text)
preg_replace('/human/', 'dude', $text)
Я написал быстрый пример , что бы было понятно
К примеру есть строка "Hello human"
ЕСТЬ СТРОКА в которой попадется или Хеллоу или Хьюмен