Java tutorial
//package com.java2s; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main { public static String IntegerToString(String str) { Pattern p = Pattern.compile("&#[0-9]{5};"); Matcher m = p.matcher(str); String g = ""; String num = ""; char c = 0; while (m.find()) { g = m.group(); num = g.substring(2, 7); c = (char) (Integer.parseInt(num)); str = str.replace(g, "" + c); } return str; } }