http://www.cnblogs.com/kiddo/archive/2008/05/08/1188800.html
public static bool IsCorrectPath(string path)
{
if (Validation.IsStringNullOrEmptyOrBlank(path))
{
return false;
}
StringBuilder builder = new StringBuilder();
builder.Append(@"^(([a-zA-Z]":)|(""))(""{1}|((""{1})[^""]([^/:*?<>");
builder.Append("""");
builder.Append("|]*))+)$");
Regex regex = new Regex(builder.ToString());
return regex.IsMatch(path);
}
9051

被折叠的 条评论
为什么被折叠?



