您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

移除emoji内容

2025/9/17 11:09:52发布21次查看
public static function removeemoji($text) { $clean_text = ; // match emoticons $regexemoticons = '/[\x{1f600}-\x{1f64f}]/u'; $clean_text = preg_replace($regexemoticons, '', $text); // match miscellaneous symbols and pictographs $regexsymbols = '/[\x{1f300}-\x{1f5ff}]/u'; $clean_text = preg_replace($regexsymbols, '', $clean_text); // match transport and map symbols $regextransport = '/[\x{1f680}-\x{1f6ff}]/u'; $clean_text = preg_replace($regextransport, '', $clean_text); // match miscellaneous symbols $regexmisc = '/[\x{2600}-\x{26ff}]/u'; $clean_text = preg_replace($regexmisc, '', $clean_text); // match dingbats $regexdingbats = '/[\x{2700}-\x{27bf}]/u'; $clean_text = preg_replace($regexdingbats, '', $clean_text); return $clean_text;}
参考地址:
http://stackoverflow.com/questions/12807176/php-writing-a-simple-removeemoji-function
以上就介绍了移除emoji内容,包括了方面的内容,希望对php教程有兴趣的朋友有所帮助。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product