[OT] REGEX Help

Yang Xiao yxiao2004 at gmail.com
Fri Mar 18 16:22:11 UTC 2005


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 at city-fan.org> 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 at redhat.com
> To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
>




More information about the fedora-list mailing list