Because your console's character set + font combination doesn't support those characters (or that 2-byte character, if that's what it is).
Moreover, I think simply using ("\\\\") should tokenize the literal.
What is that even supposed to mean? It seems you don't understand the problem. He wants a unicode escape sequence, but he's getting a literal instead. Putting a literal backslash into the regex won't help.
Mansukhdeep Thind wrote:Ohh. OK. My mistake. He wants the ouput to be tokenized as \uDC00 \uD800 and so on. Correct?
He has two characters (or perhaps two pieces of one character?), \uDC00 and \uD800. I don't know what he's trying to do with the split() call, but for #2, he's trying to reverse the order of those two characters, so that he ends up with \uD800 followed by \uDC00.
Arun Giridhar wrote:I didn't like this way because the first String it return is an empty string .So i thought of finding another way to do it using Regex
You have a problem; you've been given several possible solutions and guidance (sorry about the "nonsense" - that was rude - I'm still wondering why you felt those particular characters were important though), but you don't seem willing to try anything you've been told because there's something "wrong" with it.
Well, at the risk of sounding rude again, you don't know what you do want. And until you do, I doubt there's much we can do to help.