Java tutorial
//package com.java2s; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main { public static boolean onlyWord(String content) { boolean flag = false; Pattern p = Pattern.compile("[a-zA-Z\\u4E00-\\u9FA5]+"); Matcher m = p.matcher(content); if (m.matches()) { flag = true; } return flag; } }