12/18/2020 10:25:29 AMBibek Oli
6 AnswersNew Answer
It ignores the newline because of your regex pattern. Dot (.) does not match newlines. Here is a fixed version (see line 5) https://code.sololearn.com/W2ej6jz9ngia/?ref=app
March Zucherberg apparently, "😝".codePointAt(0) returns 128541. So the example you mentioned in the question is actually the code point at position 0. And it can be easily converted to the emoji. Using String.fromCodePoint() on the hex equivalent of the code point at position 0 of the emoji returns the emoji itself. See if this helps https://code.sololearn.com/Wuah65dHU7pO/?ref=app
After some research on your code and more on the post you provided a link on your code, I finally got what I needed. But still unknown if this method is still efficient. Please have a look at it.. https://code.sololearn.com/WV3mUti1hj39/?ref=app
But I found 1 problem in it i.e. it doesn't escape newlines to => Totally ignores it.
XXX thanks, but I didn't understand anything, full of regex. So, I did some more research and found another way, It gives the correct emoji character code but also one more code at the end. https://code.sololearn.com/W5c3br0qEyQJ/?ref=app 8...; These codes.