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

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 1
Title Test Details Pattern Title
Expression
([A-Z]:\\[^/:\*\?<>\|]+\.\w{2,6})|(\\{2}[^/:\*\?<>\|]+\.\w{2,6})
Description
This regular expression pattern can be used to check the validity of paths for file upload controls. The uploaded file can be either stored locally or accessible through UNC. It cannot contain illegal characters for the windows OS - that may be supported e.g. on Mac OS – and cannot be a URL (Yes, as weird as it may seem, some users enter URLs in the file upload box, even though there is a browse button...)
Matches
C:\temp\this allows spaces\web.config | \\Andromeda\share\file name.123
Non-Matches
tz:\temp\ fi*le?na:m<e>.doc | \\Andromeda\share\filename.a
Author Rating: Not yet rated. Alban Schmid
   Displaying page 1 of 1 pages; Items 1 to 1

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