Hello i need to match filnames with extensions.
Problem is that paths could be both unix and windows, so seperated by / or \ also unix allows . in filenames, so t.est.txt also should be matched.
My code :
var regex = new RegExp('[\\/]?([/\w+.]+/\w+)/\s*$');
var value = this.attachment.fileInput.dom.value;
console.log(value.match(regex));
console.log(regex.exec(value));
this regex works fine in rubular. But for some reason ie, chrome and firefox does not match any string and returns null.