Re: Help with eregi
| From: | Matt Matijevich | Date: | Tue, 22 Jun 2004 21:51:02 +0000 |
| Subject: | Re: Help with eregi | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-188833@lists.php.net to get a copy of this message | ||
[snip]
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
[/snip]
you could try without regular expressions
$string = 'client1/album/album_121-2132_IMG.JPG';
$arr = explode('/',$string);
print $arr[count($arr) - 1];