Title |
Test
Find
Pattern Title
|
Expression |
^[^\\\/\?\*\"\'\>\<\:\|]*$ |
Description |
Validation of a Folder Name. Excludes all forbidden characters |
Matches |
321321321 dasds |
Non-Matches |
/\3fsdfsd |
Author |
Rating:
Nikolay Yordanov
|
Source |
I wrote IT |
Your Rating |
|
Title: fail with "yo"
Name: uhm
Date: 8/6/2016 4:27:33 PM
Comment:
This regex fails for folders simply named "yo"
Title: .net
Name: Nate
Date: 4/18/2008 11:17:47 AM
Comment:
Remember, when you're putting regex strings into .net, you can save a lot of headache if you make it a habit to do @"^[^\\/?*\"\'><:|]*$"
Note on the @ symbol, meaning the string is literal, and it won't try to look at any code contained inside when its being declared.
Title: .NET
Name: jason
Date: 5/3/2007 5:46:48 PM
Comment:
in .net the pattern translates to:
string strRegex = "^[^\\/?*\"\'><:|]*$";
Regex re = new Regex(strRegex);