PHP 去除iphone,ios,emoji表情
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;
}
PHP 去除iphone,ios,emoji表情的更多相关文章
- IOS Emoji表情
IOS Emoji 前言:我比较喜欢有趣的东西,有一些有趣的小东西,可能不是多么多么牛逼,也可能不需要多高深的技巧,也不会为其他什么强大的功能而服务,但是有时候将很多有趣的小东西组合起来运用,比如在你 ...
- iOS emoji表情转码 或者判断
如果项目中有评论或者信息恢复的地方,往往会用到emoji,有时候如后台不支持emoji,就会显示乱码错误,我们可以把emoji转成unicode编码或者utf8编码格式传给服务器.当然如果后台服务器接 ...
- iOS Emoji表情编码/解码
之前做弹幕的时候 遇到的表情编码解码问题 表情编码一般是使用unicode编码 ,编码之后的格式 \ud83d\ude18\ud83d\ude18world\u4e16\u754chaha\ud83d ...
- php过滤iphone的emoji表情
public static function removeEmoji($text) { $clean_text = ""; // Match Emoticons $regexEmo ...
- iOS Emoji
iOS Emoji 前言:我比较喜欢有趣的东西,有一些有趣的小东西,可能不是多么多么牛逼,也可能不需要多高深的技巧,也不会为其他什么强大的功能而服务,但是有时候将很多有趣的小东西组合起来运用,比如在你 ...
- iOS 自定义emoji表情键盘
之前走了很多弯路,包括自己定以emoji表情,自己创建view类去处理图文混排 ,当把这些焦头烂额的东西处理完了才发现 ,其实系统自带键盘是如此的方便,iOS 系统自带的表情在view,textfie ...
- Emoji表情图标在iOS与PHP之间通信及MySQL存储
在某个 iOS 项目中,需要一个服务器来保存一些用户数据,例如用户信息.评论等,我们的服务器端使用了 PHP+MySQL 的搭配.在测试过程中我们发现,用户在 iOS 端里输入了 Emoji 表情提交 ...
- mysql支持IOS的Emoji表情
原因: UTF-8编码有可能是两个.三个.四个字节.Emoji表情是4个字节,而Mysql的utf8编码最多3个字节,所以数据插不进去. 解决办法: 将Mysql的编码从utf8转换成utf8mb4 ...
- iOS 获取emoji表情和拦截emoji表情
1 2 //将数字转为 #define EMOJI_CODE_TO_SYMBOL(x) ((((0x808080F0 | (x & 0x3F000) >> 4) | (x &a ...
随机推荐
- 桶排序-py
http://blog.chinaunix.net/uid-20775448-id-4222915.html 看了<啊哈算法>第一节,排序从小到大自己实现了. 从大到小,搜集了下资料.看了 ...
- 6.3 cmath--数学函数
本模块提供了处理复数的数学函数.因此这些函数接受整数.浮点数或者复数作为參数. 6.3.1 与极坐标相互转换的函数 在Python里表示一个复数z,实部使用z.real表示,虚部使用z.imag,能够 ...
- Linux debugger lldb
https://lldb.llvm.org/ https://lldb.llvm.org/lldb-gdb.html https://lldb.llvm.org/tutorial.html
- oracle 存储过程实现数据CURD操作
1.创建数据库表: -- Create table create table TEST_TABLE ( userid NUMBER not null, username NVARCHAR2(50), ...
- Redis on Spark:Task not serializable
We use Redis on Spark to cache our key-value pairs.This is the code: import com.redis.RedisClient va ...
- spring使用rssfeed
spring使用rssfeed import org.springframework.stereotype.Controller; import org.springframework.web.bin ...
- Tomcat的URL中文乱码解决以及传输优化
默认的tomcat容器如果直接使用get方式在url中传中文时,传到后台接收会是乱码. 乱码问题 原因: tomcat默认的在url传输时是用iso8859-1编码. 解决方案一: 在使用get传输参 ...
- MyLocationService
package com.baidu.location.service; import android.app.Service;import android.content.Intent;import ...
- Android 启动后台运行程序(Service)
Android开发中,当需要创建在后台运行的程序的时候,就要使用到Service.Service 可以分为有无限生命和有限生命两种.特别需要注意的是Service跟Activities是不同的(简单来 ...
- JAVA-JAVA、JavaScript、JavaWeb的关系
相关资料:1.http://www.cnblogs.com/youring2/archive/2013/06/06/3120645.html2.https://jingyan.baidu.com/ar ...