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]\:) (\\{1}| ((\\{1}) [^\\] ([^/:*?<>"|]*(?<![ ])))+)$
Description
Validates windows path and invalidates UNC path
Matches
c:\34\445\546\3.htm | C:\
Non-Matches
\\qaz | c:\Ram<\ | C: or c:\\ or \\
Author Rating: The rating for this expression. Gaurav Shrivastava
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: remember to take spaces out of expression
Name: ken
Date: 2/2/2006 10:41:25 AM
Comment:
The correct expression should be this: ^([a-zA-Z]\:)(\\{1}|((\\{1})[^\\]([^/:*?<>"|]*(?<![ ])))+)$ For some reason, the one that's on the page has extra spaces in it...


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