RE: [PHP-WIN] Stripping filepath from string

From: Date: Tue, 09 Oct 2001 17:20:23 +0000
Subject: RE: [PHP-WIN] Stripping filepath from string
Groups: php.windows 
Request: Send a blank email to php-windows+get-9768@lists.php.net to get a copy of this message
Thanks to all who provided input. The basename function does the trick (as pointed out by Serge). Once again thank you ;-) /Christian -----Original Message----- From: Serge Nicolas [mailto:sn@witness.fr] Sent: 9. oktober 2001 18:37 To: Christian Sandfeld Subject: Re: [PHP-WIN] Stripping filepath from string http://www.php.net/manual/en/function.basename.php Think this could help. ----- Original Message ----- From: "Christian Sandfeld" <csa@zen-sys.com> To: <php-windows@lists.php.net> Sent: Tuesday, October 09, 2001 3:41 PM Subject: [PHP-WIN] Stripping filepath from string > Hi list, > > I know I have seen this somewhere - but I can't find it (and for some reason > I can't get my head around it). > > Is there a predefined function or alternatively an easy way to strip the > filepath of a string containing both filepath and filename? > > Strings could look like this: > /my/file/path/myfile > /my/file/path/myfile.name > c:\my\file\path\myfile > c:\my\file\path\myfile.name > etc... > > I know this should be fairly simple, but my mind is blank (if there's no > predefined function I know I should probably use some regex, but me and > regex don't get along (I always mess up)). > > Any help will be greatly appreciated :-) > > /Christian > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net > For additional commands, e-mail: php-windows-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.windows (#9768) next »