I have a Java servlet which accepts text from mobile devices. I need to check each character and check if it is a normal text or if it is an emoji before I insert it into my database. The problem I am having is how do I detect if a character is emoji?
ok simple example defined private string emoji regex.
variable with test sentence
you can use a
Matcher
to find any group in the test string that matches theregex
.this will print the emoji which matches them in string. Hope this helps.