> Whooops, > > Pasted wrong line. This should do it: > > $string = preg_replace("/(\.*\/)+(.*?\.*\/)?/s", "", $string);
Gah... Not.. enough... caffeine: Modification: $string = preg_replace("/(\.*\/)+(.*?\.*\/)?(\.*)?/s", "", $string); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]