Actually, you need to escape the period, since a period in a regexp pattern means something special: match any character.
Soo... escape all periods in your "word" !
EDIT: Also, the preg_ functions are much faster than the ereg functions, so I would recommend you use those instead. For example:
$word = str_replace('.', '\\.', $row['word']);
$pattern = "/$word/i";
preg_replace($pattern, '', $str);