/** * 判斷字符串包含表情 * @param value * @return */ public static boolean containsEmoji(String value){ boolean flag = false; try { Pattern p = Pattern .compile("[^\\u0000-\\uFFFF]"); Matcher m = p.matcher(value); flag = m.find(); } catch (Exception e) { flag = false; } return flag; }