$filename = strtolower (eregi_replace ("[^A-Za-z0-9_.]", "_", $filename));
seems to be what I want. thanks to everyone for the help Javier _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php