V
vtxr1300
I'm having a problem with a regular expression in conjunction with the
regular expression validator. I am trying to make sure that when a user
browses for a file to upload, it ends in gif, jpeg or jpg. I have the
following expression which validates fine in a .net tester I use and
also a javascript tester. But when I use the following path on the
page, it gives me the error message that I haven't entered a valid
image.
(\.gif|\.jp[e]?g|\.png|\.JP[E]?G|\.GIF|\.PNG)$
C:\Documents and Settings\Geoff\Desktop\mypic.jpg
What am I doing wrong here?
regular expression validator. I am trying to make sure that when a user
browses for a file to upload, it ends in gif, jpeg or jpg. I have the
following expression which validates fine in a .net tester I use and
also a javascript tester. But when I use the following path on the
page, it gives me the error message that I haven't entered a valid
image.
(\.gif|\.jp[e]?g|\.png|\.JP[E]?G|\.GIF|\.PNG)$
C:\Documents and Settings\Geoff\Desktop\mypic.jpg
What am I doing wrong here?