Re: [OT] REGEX Help

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

 



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.


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

  Powered by Linux