Be careful, don't replace all ereg_replace() with str_replace() as many people will likely to recommend if there is regular expression stuffs, or your script will stop running !!!
Example : replace the (.) at the end of the text with (...)
<?php
$text = "This is a simple text.";
print( ereg_replace( "\.$", "...", $text ) );
?>
Test with str_replace() you will find it's not working.