On Fri, 2003-09-19 at 15:03, Edward Pollard wrote:
I have a form with which one can upload images.
However, Internet Explorer for PC is a very clever program, and instead of putting the filename in the 'filename' attribute of the request object, it puts the whole local path of the file. This of course is unsuitable for a filename on the server.
And for any remaining IE6 users who may happen to value their privacy.
However, due the the escape nature of the backslash, I'm having a tremendous problem writing a function to clean up this mess. I am certain I used to have a code snippit to do this, but cannot find it.
I assume you want a regex that captures everything after the final backslash? How about (untested): '.*\\([\w|\d]+)' HTH, Dylan