there might be a better way to do this, but below is what i came up with.
<?
$file_contents = file("bad_words.txt");
foreach($file_contents as $word)
{
$word = str_replace("\n","",$word);
$patterns[] = "/" . $word . "[a-z]/i";
}
echo preg_replace($patterns, "***", $original_text);
?>
place each word to be removed on its own line in a file called bad_words.txt.