* Thus wrote Tom Z. Meinlschmidt:
> On Tue, Jun 22, 2004 at 10:08:37PM +0300 Robin Vickery [EMAIL PROTECTED] wrote:
> > On Tue, 22 Jun 2004 14:57:28 -0400, Ryan Schefke <[EMAIL PROTECTED]> wrote:
> > > 
> > > Could someone please help me with an eregi statement.
> > > 
> > > I have a string that can vary as such:
> > > 
> > > client1/album/album_121-2132_IMG.JPG
> > > 
> > > ...
> > > 
> > > I want to select whatever comes after the last forward slash, like
> > > album_121-2132_IMG.JPG
> > 
> > preg_match('#client[[:digit:]]+/album/(album_[[:digit:]]{3}-[[:digit:]]{4}_IMG\.JPG)#i',
> > $string, $matches);
> 
> too complex.
> 
> eregi("\/([a-z0-9_-]*\.jpg)$", $string, $arg) is good enough :)

Still too complex.

basename('client1/album/album_121-2132_IMG.JPG');

Curt
-- 
Feels like he's filling Mr Holmes shoes right now :)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to