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 File Path
Expression
("(([a-zA-Z]:)|(\\\\[^/\\:\*\?""<>\|]+(\\[a-zA-Z]\$)?))\\([^/\\:\*\?""<>\|]+\\)*[^/\\:\*\?""<>\|]+(\.[^/\\:\*\?""<>\|]+[^/\\:\*\?""<>\|\s])?")|((([a-zA-Z]:)|(\\\\[^/\\:\*\?""<>\|\s]+(\\[a-zA-Z]\$)?))\\([^/\\:\*\?""<>\|\s]+\\)*[^/\\:\*\?""<>\|\s]+(\.[a-zA-Z0-9]+)?)
Description
Matches full windows paths and UNC paths (allowing spaces in quoted text). For non quoted text, the extension of the file must be alphanumeric.
Matches
C:\test_for_spaces\test_extension | C:\test_for_spaces\test_extension.t92 | "C:\test for spaces\New Text Document.txt" | \\machine1\shared_2\hello_world.txt | "\\machine1\c$\shared 4\hello world.txt"
Non-Matches
"\\machine1\c$\test|pipe:colon.txt" | C:\random space\test.txt | C\\bad\test.t
Author Rating: The rating for this expression. Ben C
   Displaying page 1 of 1 pages; Items 1 to 1

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