Java tutorial
//package com.java2s; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main { public static boolean isChineseBlank(String str) { String regex = "^[^\\s\u4e00-\u9fa5]{6,16}$"; Pattern p = Pattern.compile(regex); Matcher m = p.matcher(str); return m.matches(); } }