I have string which contains substrings like \u0022
, \u003C
, \n
and want to replace them by the characters they stand for. What's the most straight forward way? Of course I could do something like
code = code.replaceAll("\\\\u003C", "<");
for each such character, but that's a little bit annoying.
Edit: To make it clear, I have already a string like
code="Hello \\u0022 World \\n \\u003C And so on.";