特殊字符表情包
2016-07-19 16:23
295 查看
public 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;
}
相关文章推荐
- 用JavaScript判断日期、数字、整数和特殊字符
- 不支持表情包的自定义控件NoEmojiEditText
- 康纳的表情包
- python使用多线程爬取表情包
- python实现人脸识别抓取人脸并做成熊猫头表情包
- (PHP)海量数据输出CSV文件时由于特殊字符引起的CSV文件格式异常的问题解决
- HTML那些可爱的“表情包”
- 康纳的表情包
- 请求评论中表情包的方法
- 沙漠表情包如何制作 QQ表情包制作教程
- window.open()函数中,Name参数不能包括特殊字符
- Android EditText禁止输入空格和特殊字符
- json单引号和双引号转义 完美解决由特殊字符引起的json解析错误
- 环信3.0添加聊天表情包
- 简短生成随机密码支持特殊字符
- iOS中匹配表情包
- 程序员专用表情包_拿走不谢!
- 炫酷的百度贴吧表情包
- 插入数据库之前将特殊字符转义
- java判断scanner输入是中文、英文字母、数字还是特殊字符