Created
April 7, 2019 19:02
-
-
Save kovkor/ae259b91d5f5e56c6884c1070113f88a to your computer and use it in GitHub Desktop.
Remove emojis from string but allow all other characters
This file contains hidden or 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
| <?php | |
| function removeEmoji($string) { | |
| return mb_ereg_replace('[^\p{L}\p{N}\p{P}\p{Z}\r\n\<\>]','',$string); | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment