Код: Выделить всё
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Main {
public static void main(String[] args) {
String regex = "^(/[^/[a-zA-Z0-9_.-]+]*)+/?$";
String inString = "/tmp"; // the same goes for e.g. /usr/pgsql-15
Matcher matcher = Pattern.compile(regex).matcher(inString);
System.out.println("Matches regex: " + matcher.matches());
}
}
Может ли это быть связано с JDK-6609854?
Подробнее здесь: https://stackoverflow.com/questions/792 ... gation-via
Мобильная версия