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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
([,!@#$%^&*()\[\]]+|\\\.\.|\\\\\.|\.\.\\\|\.\\\|\.\.\/|\.\/|\/\.\.|\/\.|;|(?<![A-Z]):)
Description
Checks file paths for offending characters A successful file path is one that does not return a match
Matches
C:\invalid\#path\here,\somewhere | /invalid/^path/@here/ | C:\..\relative\not\allowed
Non-Matches
C:\valid\path\file.txt | /home/user/valid/file.txt
Author Rating: Not yet rated. Joshua St. Marie
Source
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: Not clear that this is windows biased
Name: Randal L. Schwartz
Date: 8/24/2005 10:33:34 PM
Comment:
It's not stated, but this is related to windows. In Unix, all characters except / and \0 are permitted in a path step. And yes, that means that newline *is* legal and must be permitted to be dealt with.


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