原文链接:正则表达式如何匹配""
# 匹配"" Pattern compile = Pattern.compile("^$"); System.out.println(compile.matcher("").find()); //true System.out.println(compile.matcher("").matches()); //true System.out.println("".matches("^$")); //true
京公网安备 11010502049817号