Title |
Test
Find
Pattern Title
|
Expression |
^([a-zA-Z]\:|\\\\[^\/\\:*?"<>|]+\\[^\/\\:*?"<>|]+)(\\[^\/\\:*?"<>|]+)+(\.[^\/\\:*?"<>|]+)$ |
Description |
This regular expression match any valid file path. It checks local drives and network path. The file extension is required. |
Matches |
c:\Test.txt | \\server\shared\Test.txt | \\server\shared\Test.t |
Non-Matches |
c:\Test | \\server\shared | \\server\shared\Test.? |
Author |
Rating:
Roberto Misticoni
|
Source |
|
Your Rating |
|
Title: Problem with Spaces
Name: Rick
Date: 12/13/2009 5:48:44 PM
Comment:
This regular expression will not stop the entering of spaces at the end once the filename is specified, e.g.:
"c:\windows\system32\ccm\logs\smstcno.log flkeflk eflkelfke efefef"
will match.
Title: Not working
Name: Kristian
Date: 6/17/2009 4:47:39 AM
Comment:
Does not work for normal windows paths.
Title: Not working for the test Input
Name: Saibal
Date: 10/12/2006 3:08:33 AM
Comment:
The test sting that you have provided does not work with the Expression
Title: Regular Expression: File Path Pattern
Name: Pat Walker
Date: 9/28/2006 5:53:43 PM
Comment:
Is there an updated expression that will work in IE 7.0? It still does not seem to work.
Title: Does not work in IE 7.0
Name: Nitin Arora
Date: 2/15/2006 8:06:49 AM
Comment:
Hi,
I have used this regular expression in my web site. Its not working in IE 7.0.
Can you check and update the expression so that it supports IE 7.0.
Thanks
Nitin Arora