Re: [OT] REGEX Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Oh, I'm using PERL, I found the module File::Basename does just that,
thanks for the help!

Yang


On Fri, 18 Mar 2005 16:16:26 +0000, Paul Howarth <paul@xxxxxxxxxxxx> wrote:
> Yang Xiao wrote:
> > Hi all,
> > I can't remember how to strip the full path out and just get the file
> > name in something like this
> > /fullpath/to/file or /full/path/to/file.ext
> > Can anyone provide a regex that will get me just file or file.ext.
> 
> You don't say what language you are trying to do this in.
> 
> If it's part of a shell script you can just use:
> 
> filename=`basename $pathname`
> 
> Paul.
> 
> --
> fedora-list mailing list
> fedora-list@xxxxxxxxxx
> To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
>


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux