public static String lida(String content, int index) {
        StringBuffer sbContent = new StringBuffer();
        int leftIndex = content.indexOf("[", index);
        int rightIndex = content.indexOf("]", index);
        if (leftIndex != -1 && rightIndex != -1 && rightIndex > leftIndex) {
            //如果"["和"]"之前存在"[",那么重置leftIndex索引，以便最近的"["和"]"匹配
            if (content.substring(0, rightIndex).lastIndexOf("[") != leftIndex) {
                leftIndex = content.substring(0, rightIndex).lastIndexOf("[");
            }
            String cn = content.substring(leftIndex, rightIndex + 1);
            String imgName = EmojiHelper.cn2Img(cn);
            if (StringUtils.isNotBlank(imgName)) {
                sbContent.append(content.substring(0, leftIndex));
                sbContent.append("<img src=\"" + imgName + "\">");
                sbContent.append(content.substring(rightIndex + 1, content.length()));
                //匹配成功并且替换了字符串，则将开始索引以左边匹配到的为准
                return lida(sbContent.toString(), leftIndex - 1);
            } else {
                sbContent.append(content);
                return lida(sbContent.toString(), rightIndex + 1);
            }
        } else if (leftIndex != -1 && rightIndex != -1 && rightIndex < leftIndex) {
            return lida(content, rightIndex + 1);
        }
        return content;
    }