Hi
I wish to use the following regex for validating a file-upload:
/^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w ]*))+\.(ext)$/
But i want to be able to specify the ext
filter.
Is this right?
function validateFile(str, ext) {
alert(str);
var expr = new RegExp("/^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w ]*))+\.(" + ext.toLowerCase() + ")$/");
alert(expr);
return expr.test(str);
}