Here you can find the source of containChinese(String s)
public static boolean containChinese(String s)
//package com.java2s; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main { public static boolean containChinese(String s) { if (null == s) { return false; }// www. j ava2s. com Pattern pattern = Pattern.compile(".*[\u4e00-\u9fbb]+.*"); Matcher matcher = pattern.matcher(s); return matcher.matches(); } }