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 > > client2/album/album_121-2132_IMG.JPG > > client59/album/album_121-2132_IMG.JPG > > client499887/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); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php