// 过滤emoji表情
function filteremoji (val) {
var ranges = [
'\ud83c[\udf00-\udfff]',
'\ud83d[\udc00-\ude4f]',
'\ud83d[\ude80-\udeff]'
]
var emojireg = val
emojireg = emojireg.replace(new RegExp(ranges.join('|'), 'g'), '')
return emojireg
}
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11