remove_emoji.php (204B)
<?php
function removeEmoji($string, $replacement = '') {
return preg_replace('/(?:\xF0[\x90-\xBF][\x80-\xBF]{2}|[\xF1-\xF3][\x80-\xBF]{3}|\xF4[\x80-\x8F][\x80-\xBF]{2})/s', $replacement, $string);
}
Back (Current repo: scraps)random scraps and notes that are useful to meTo clone this repository: git clone https://git.viktor1993.net/scraps.git |
| Log | Download | Files | Refs |
remove_emoji.php (204B)
<?php
function removeEmoji($string, $replacement = '') {
return preg_replace('/(?:\xF0[\x90-\xBF][\x80-\xBF]{2}|[\xF1-\xF3][\x80-\xBF]{3}|\xF4[\x80-\x8F][\x80-\xBF]{2})/s', $replacement, $string);
}