Title |
Test
Find
File Path
|
Expression |
^(([a-zA-Z]\:)|(\\))(\\{1}|((\\{1})[^\\]([^/:*?<>"|]*))+)$ |
Description |
Checks for a valid Filepath, either located on a local drive or a UNC share on the network. Use the following string to include the regex within a XML defintion file: RegEx="^([a-zA-Z]\:)|(\\)(\\{1}|((\\{1})[^\\]([^/:*?<>"|]*(?<!\[\])))+)$"/> (encode the appropiate HTML characters like <,>," with the appropiate HTML codes < = (ampersand)lt; > = (ampersand)gt; " = (ampersand)quote; |
Matches |
C:\SomeFilePatt|\\SomeServer\SomeShare |
Non-Matches |
C:|\SomeServer |
Author |
Rating:
Not yet rated.
Jens K. Suessmeyer
|
Source |
|
Your Rating |
|
Title: thanks
Name: Ilham Israfilov
Date: 4/11/2014 5:02:04 AM
Comment:
big big big thanks!!! works perfect. i can validate both local and network paths
Title: thanks
Name: Ilham Israfilov
Date: 4/11/2014 5:01:50 AM
Comment:
big big big thanks!!! works perfect. i can validate both local and network paths
Title: thanks
Name: Ilham Israfilov
Date: 4/11/2014 5:01:36 AM
Comment:
big big big thanks!!! works perfect. i can validate both local and network paths
Title: Thanks for your regEx
Name: Vasiliy
Date: 10/3/2009 5:14:44 AM
Comment:
It's all good, but I found some trouble: C:\*folder\ is match by your regEx.
I corret your regEx to this:
^(([a-zA-Z]\:)|\\)(\\|(\\[^/:*?<>"|]*)+)$
Title: Big Thanks!!!
Name: Yuriy
Date: 3/10/2009 5:59:39 PM
Comment:
Helped me big time solve my problem with FileUpload control (http://www.galanter.net/?p=128). Job well done!
Title: Simple and Sweet Expression
Name: Nayan
Date: 10/17/2008 12:48:29 AM
Comment:
Tried many expressions but this one was the only one worked
C:\
\\test\c$\
\\123.2.2.2\c$\
C:\test
C:\test\myfile.txt