I'm trying to strip the file extension from a file name using a regular expression and String.replace
I'm using this regex: /^.*(\..*)/
which should capture the extension, or at least everything after a .
Doing str.replace(/^.*(\..*)/,"");
just gives me a blank string.
Doing str.replace(/^.*(\..*)/,"");
gives me ".pdf"
fiddle: http://jsfiddle.net/KAK82/