Java中正则表达式判断中文时间:2025-02-14 21:16:41String regex = "[\u4e00-\u9fa5]"; String str = "这是一个中文字符串"; // 判断字符串中是否包含中文 if (str.matches(".*" + regex + ".*")) { System.out.println("字符串中包含中文"); } else { System.out.println("字符串中不包含中文"); }