public static boolean isConSpeCharacters(String string){ if(string.replaceAll("[\u4e00-\u9fa5]*[a-z]*[A-Z]*\\d*-*_*\\s*","").length()==0){ //不包含特殊字符 return false; } return true; }原文链接:https://www.f2er.com/regex/359755.html
public static boolean isConSpeCharacters(String string){ if(string.replaceAll("[\u4e00-\u9fa5]*[a-z]*[A-Z]*\\d*-*_*\\s*","").length()==0){ //不包含特殊字符 return false; } return true; }原文链接:https://www.f2er.com/regex/359755.html