Mate, it won't go to the last dot after the last slash, it'll go to the first it runs into so it isn't help me much. Do you have any idea how to fix that?
Sorry if I didn't make that clear. I just gave an example, and I tried to say in my starting off sentence.
EDIT: dt helped me on IRC
code:
var re = /\\([^\\]*?)\.[^\.]*$/;
var FileBase = re.exec("C:\\David\\eg.png")[1];