Re: regular expression

From: Date: Thu, 01 Nov 2001 11:54:56 +0000
Subject: Re: regular expression
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-73145@lists.php.net to get a copy of this message
> Whooops, > > Pasted wrong line. This should do it: > > $string = preg_replace("/(\.*\/)+(.*?\.*\/)?/s", "", $string); Gah... Not.. enough... caffeine: Modification: $string = preg_replace("/(\.*\/)+(.*?\.*\/)?(\.*)?/s", "", $string);

« previous php.general (#73145) next »