Regular Expression Validator

B

Ben Crinion

Hi

I have a page with a html <input type="file"> element on it and i am using a
regular expression validator to ensure that the user is uploading an image
to my server.

Here is my regular expression
/^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))+(.gif|.GIF|.jpg|.JPG|.jpeg|.JPEG|.bmp|.BMP)$/

It should match "C:\any directory\structure\you like\any image name with an
extension from the list above.gif"

This works in perl and correctly matches but it doesnt match in .NET.

The funny thing is im sure this has worked in the past because i have images
on my site which have been uploaded using it. I recently upgraded my code
from ASP.NET 1.1 to ASP.NET 2.

Thanks
Ben Crinion
 
B

Ben Crinion

Hi

It seems that this is a bug with internet explorer 7.

It works fine with IE6.

Thanks
Ben Crinion
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top