zoukankan      html  css  js  c++  java
  • QQ表情符号解析

    /**
     * 判断是否是QQ表情
     * 
     * @param content
     * @return
     */
    public static boolean isQqFace(String content) {
        boolean result = false;
     
        // 判断QQ表情的正则表达式
        String qqfaceRegex = "/::\)|/::~|/::B|/::\||/:8-\)|/::<|/::$|/::X|/::Z|/::'\(|/::-\||/::@|/::P|/::D|/::O|/::\(|/::\+|/:--b|/::Q|/::T|/:,@P|/:,@-D|/::d|/:,@o|/::g|/:\|-\)|/::!|/::L|/::>|/::,@|/:,@f|/::-S|/:\?|/:,@x|/:,@@|/::8|/:,@!|/:!!!|/:xx|/:bye|/:wipe|/:dig|/:handclap|/:&-\(|/:B-\)|/:<@|/:@>|/::-O|/:>-\||/:P-\(|/::'\||/:X-\)|/::\*|/:@x|/:8\*|/:pd|/:<W>|/:beer|/:basketb|/:oo|/:coffee|/:eat|/:pig|/:rose|/:fade|/:showlove|/:heart|/:break|/:cake|/:li|/:bome|/:kn|/:footb|/:ladybug|/:shit|/:moon|/:sun|/:gift|/:hug|/:strong|/:weak|/:share|/:v|/:@\)|/:jj|/:@@|/:bad|/:lvu|/:no|/:ok|/:love|/:<L>|/:jump|/:shake|/:<O>|/:circle|/:kotow|/:turn|/:skip|/:oY|/:#-0|/:hiphot|/:kiss|/:<&|/:&>";
        Pattern p = Pattern.compile(qqfaceRegex);
        Matcher m = p.matcher(content);
        if (m.matches()) {
            result = true;
        }
        return result;
    }
    高否?富否?帅否? 否? 滚去学习!
  • 相关阅读:
    Intent
    关注博客
    Bitmap
    图片压缩
    读取相册、拍照
    Godot开发环境与学习资源
    源码开放的引擎研究
    海龟交易法操作商品期货
    重新开始
    使用node_redis进行redis数据库crud操作
  • 原文地址:https://www.cnblogs.com/baixc/p/4849768.html
Copyright © 2011-2022 走看看