Validating file extension with regularexpressionvalidator

Rated 4.93/5 based on 846 customer reviews

@Knowledge Seeker, It depends on whether the Match function you are using is trying to match the entire string or only part of the string.

If you try it and it works on one case, it should work in the general case also.

Bm P , true Image is valid : , true Image is valid : , true Image is valid : , true Image is valid : , true Image is valid : , false Image is valid : , false Image is valid : , false Image is valid : , false Image is valid : , false Image is valid : , false Image is valid : , false Image is valid : , false Image is valid : , false Image is valid : , false Image is valid : a.

Hi, using version 4.5 I am trying to validate file upload image validation and seems this expression is not working.

Recently I was looking for a regular expression to validate a file path and extension.

I found several of them on Google but none of them fit my requirement.

Unfortunately we cannot simply ignore case in the expression.

Here is the Regular Expression to validate the file path and extension and it compatible with Java Script and ASP. \192.168.0.1\folder\\192.168.0.1\my folder\folder.2\c:\my folder\another_folder\c:\my folder\another_folder\c:\my folder\another_folder\ab*c.v2c:\my? In this article I explain validation with a file upload control using regular expression validation control in ASP. This article will help you to validate the extension of a file to be uploaded before the file is uploaded in ASP. Description Usually for checking the desired file extensions in a file upload control we use C# code to determine whether the file extension is valid or not.But, we can also validate the file type of the file upload control using the ASP. We need to only provide the correct regular expression for the desired file type to the validation control. "Kevin Spencer" In that case, Chris, it looks like boomfield has already guessed your question, and given you a good answer! "bloomfield" Here there are some clues string check File Regex = @"^. "bloomfield" Here there are some clues string check File Regex = @"^."Chris Kennedy" Sorry about repost but my news server sometimes gets confused and appends the question to the wrong thread. You can sometimes find it on Google but not always. I want an expression to check for a variable number of expressions in the extension of a file path e.g.

Leave a Reply