Java Replace Unicode Characters in a String
I have a string which contains multiple unicode characters. I want to identify all these unicode characters, ex: \ uF06C , and replace it with a back slash and four hexa digits without "u" in it. Example : Source String: "add \uF06Cd1 Clause" Result String: "add \F06Cd1 Clause" How can achieve this in Java? Edit: Question in link Java Regex - How to replace a pattern or how to is different from this as my question deals with unicode character. Though it has multiple literals, it is considered as one single character by jvm and hence regex won't work. Paul The correct way to do this is using a