RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
([a-zA-Z]:(\\w+)*\\[a-zA-Z0_9]+)?.xls
Description
This RegEx will help to validate a physical file path with a specific file extension (here xls)
Matches
E:\DyAGT\SD01A_specV2.xls
Non-Matches
E:\DyAGT\SD01A_specV2.txt
Author Rating: Not yet rated. vinod kumar
Source
Your Rating
Bad Good

Enter New Comment

Title
 
Name
 
Comment
 
Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: Incorrect
Name: M.R.
Date: 11/4/2010 4:28:56 PM
Comment:
It validates also xlsTest.exe This is a very serious problem when uploading files on a server. Regards, M.R.


Title: Fail with not allowed chars
Name: Eduardo Miranda
Date: 7/27/2006 4:37:40 PM
Comment:
c:\test\"test.xls


Title: testing multiple extensions
Name: Muhammad Younas Awan
Date: 6/2/2005 5:12:01 AM
Comment:
if you want to test more than one extensions, use this expression: ([a-zA-Z]:(\\w+)*\\[a-zA-Z0_9]+)?[.xls|.jpg|.gif|.bmp]$


Title: Another correct
Name: Milo
Date: 3/6/2005 4:24:40 PM
Comment:
It won't match... c:\asdasdsakz\jhkjhjkh.xls


Title: Correction needed
Name: Daz
Date: 2/16/2004 9:07:39 AM
Comment:
It currently matches: "Woohoo.xls.woooh" You should add the $ at the end. New regex: ([a-zA-Z]:(\\w+)*\\[a-zA-Z0_9]+)?.xls$


Copyright © 2001-2018, RegexAdvice.com | ASP.NET Tutorials