// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Unescape {
    private static final Pattern p = Pattern.compile("\\\\u([0-9A-F]{4})");
    public static String U2U(String s) {
        String res = s;
        Matcher m = p.matcher(res);
        while(m.find()) {
            res = res.replaceAll("\\" + m.group(0), Character.toString((char)Integer.parseInt(m.group(1), 16)));
        }
        return res;   
    }
    public static void main(String[] args) {
        System.out.println(U2U("\\u0041\\u0042\\u0043\\u000A\\u0031\\u0032\\u0033"));
    }
}
