@Test public void testGetPureName() { String n = WXUtils .getPureName("一个emoji<span class=\"emoji emoji23434\"></span>"); assertEquals("一个emoji", n); n = WXUtils.getPureName( "2个emoji<span class=\"emoji emoji23434\"></span> <span class=\"emoji emoji23434\"></span>"); assertEquals("2个emoji", n); n = WXUtils.getPureName( "2个emoji<span class=\"emoji emoji23434\"></span>中<span class=\"emoji emoji23434\"></span>"); assertEquals("2个emoji中", n); n = WXUtils.getPureName( "一个emoji<span class=\"emoji emoji23434\"></span>一个emoji"); assertEquals("一个emoji一个emoji", n); }
public static String getPureName(String name) { String regex = "<span class=\"emoji[\\w\\s]*\"></span>"; return name.replaceAll(regex, "").trim(); }
WXUtils { public static String getPureName(String name) { String regex = "<span class=\"emoji[\\w\\s]*\"></span>"; return name.replaceAll(regex, "").trim(); } }
WXUtils { public static String getPureName(String name) { String regex = "<span class=\"emoji[\\w\\s]*\"></span>"; return name.replaceAll(regex, "").trim(); }  }
WXUtils { public static String getPureName(String name) { String regex = "<span class=\"emoji[\\w\\s]*\"></span>"; return name.replaceAll(regex, "").trim(); }  static char getContactChar(IContact contact); static String decodeEmoji(String src); static String getPureName(String name); static String formatHtmlOutgoing(String name, String msg, boolean encode); static String formatHtmlIncoming(WechatMessage m, AbstractFrom from); }
WXUtils { public static String getPureName(String name) { String regex = "<span class=\"emoji[\\w\\s]*\"></span>"; return name.replaceAll(regex, "").trim(); }  static char getContactChar(IContact contact); static String decodeEmoji(String src); static String getPureName(String name); static String formatHtmlOutgoing(String name, String msg, boolean encode); static String formatHtmlIncoming(WechatMessage m, AbstractFrom from);  }