1 import Java. util. regEx. matcher; 2 Import Java. util. regEx. pattern; 3 4/** 5 * @ declare: Unicode help class <br> 6 * @ Author: cphmvp 7 * @ version: 1.0 8 * @ Date: june 10, 2014 11:45:34 9 */10 public class unicodeutils {11 public static void main (string [] ARGs) {12 string teststr = "2014 & #24180; & #26149; & #22799; & #23395; "; 13 system. out. println (getstr (teststr); 14} 15 16/** 17 * @ declare: visible characters 18 * @ Param str19 *: & #24180; 20 * @ return 21 * @ author cphmvp22 */23 public static string getstr (string Str) {24 string RegEx = "& # (\ W {5 });"; 25 pattern Pa = pattern. compile (RegEx); 26 string str0 = STR; 27 matcher = pa. matcher (STR); 28 string tmstr0 = NULL, tmstr = NULL, zhuanhuanstr = NULL; 29 While (matcher. find () {30 tmstr0 = matcher. group (); 31 tmstr = matcher. group (1); 32 // system. out. println (tmstr); 33 zhuanhuanstr = (char) integer. parseint (tmstr) + ""; 34 str0 = str0.replace (tmstr0, zhuanhuanstr); 35} 36 return str0; 37} 38 39}