Page 1 of 1

extracting filename

PostPosted: Mon Dec 15, 2003 5:26 pm
by shalindalal
I am looking for a regular expression to extract filename (excluding the extension) from a string with the path information of the file.

for e.g.
from:
the/whole/filepath/with/filename.extension
I want to extract "filename"

I would really appreciate any help

Shalin

PostPosted: Mon Dec 15, 2003 5:40 pm
by Smite
Is this in Newsbin? 'cause Newsbin can't execute regex, only filter by it.
In other programs /.*$ might give you either /whole/filepath/with/filename.extension, or if you're lucky /filename.extension depending on how it parses the string. But you'd need to find a program that supports variables to actually extract the filename, and how that works varies by the program.

I suggest you look for help in a more appropriate place for that program...