Cod PHP:
$result=str_replace(array(" mere ", " mere.", " mere,", " mere;"), array(" ", ".", ",", ";"), $text);
echo 
$result; 
Dar pentru a schimba "mere" in textul "Ana are mere", Notepad2 e mai recomandat.