windows « validation « Java Regex Q&A

Home
Java Regex Q&A
1.Development
2.find
3.group
4.Match
5.matcher
6.number
7.Operation
8.parse
9.Pattern
10.replace
11.validation
12.word
Java Regex Q&A » validation » windows 

1. Validate a file name on Windows    stackoverflow.com

public static boolean isValidName(String text)
{
    Pattern pattern = Pattern.compile("^[^/./\\:*?\"<>|]+$");
    Matcher matcher = pattern.matcher(text);
    boolean isMatch = matcher.matches();
    return isMatch;
}
Does ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.