fork(46) download
  1. import java.util.regex.Matcher;
  2. import java.util.regex.Pattern;
  3.  
  4. class Main {
  5. public static void main (String[] args) throws java.lang.Exception {
  6. String str = "\\u003c";
  7. Matcher m = Pattern.compile("(?i)\\\\u([\\da-f]{4})").matcher(str);
  8. if (m.find()) {
  9. String a = String.valueOf((char) Integer.parseInt(m.group(1), 16));
  10. System.out.printf("Unicode String is: [%s]%n", a);
  11. }
  12. }
  13. }
Success #stdin #stdout 0.03s 245632KB
stdin
Standard input is empty
stdout
Unicode String is: [<]