Title |
Test
Find
Pattern Title
|
Expression |
^([a-zA-Z]\:|\\)\\([^\\]+\\)*[^\/:*?"<>|]+\.htm(l)?$ |
Description |
Validates a file path on your local drive or a network drive. A similar one was written by Vinod Kumar but it does not reject asterisks in the path. Moreover, his did not work with RegularExpressionValidators. This one does.
|
Matches |
x:\test\testing.htm | x:\test\test#$ ing.html | \\test\testing.html |
Non-Matches |
x:\test\test/ing.htm | x:\test\test*.htm | \\test?<.htm |
Author |
Rating:
Not yet rated.
asdf asdfa
|
Source |
http://groups.google.com/groups?hl=en&amp;amp;lr=&amp;amp;ie=UTF-8&amp;amp;oe=UTF-8&amp;amp;threadm=d2d855ea.020423144 |
Your Rating |
|
Title: File Name
Name: Roberto Misticoni e Girolamo Di Cola
Date: 10/28/2003 9:26:36 AM
Comment:
This regular expression fails e.g. c:\\ because it match.
this is our idea:
^([a-zA-Z]\:|\\\\[^\/\\:*?"<>|]+)(\\[^\/\\:*?"<>|]+)+(\.[^\/\\:*?"<>|]+)$
Roberto Misticoni
Girolamo Di Cola