The regex I dug up is:
^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w ]*.*))+\.(jpg|JPG|png|PNG|gif|GIF)$
It doesn't work when I test for it using:
Code: Select all
var regex = ^((їa-zA-Z]:)|(\\{2}\w+)\$?)(\\(\wї\w ]*.*))+\.(jpg|JPG|png|PNG|gif|GIF)$;
if(photo.value !='' && !regex.test(photo.value))
{
alert ("we only support .jpg, .png, .gif");
return false;
}Could it be the squigglies?