T., Here's what you want in one simple line. It works with multiple periods, spaces, whatever (I've tested it). It's best to use the PCRE functions since they are binary safe, but eregi_replace also works fine (but preg_replace would be better).
preg_replace("/(.*)(\..*)/","$1a$2",$your_search_var_here) Mike... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php