Created
November 25, 2018 11:57
-
-
Save mastern2k3/4be42a528f05db74e67f72e44d0e1c37 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
String emojiString = "😋 Get Emoji — All Emojis to ✂ Copy and 📋 Paste 👌"; | |
String emoniRegex = "([\\u20a0-\\u32ff\\ud83c\\udc00-\\ud83d\\udeff\\udbb9\\udce5-\\udbb9\\udcee])"; | |
String extractedEmojis = ""; | |
Matcher matcher = Pattern.compile(emoniRegex).matcher(emojiString); | |
while (matcher.find()) { | |
extractedEmojis += matcher.group(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment