利用正则匹配emoji表情包并且去除
let Arr=['emoji💮','emoji2🌳','emoji3🌳','🍔']
//定义一个表情包正则
let emojiReg = /[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi;
//循环去除
for(let i in Arr){
Arr[i]=Arr[i].replace(emojiReg, "");
}
//['emoji', 'emoji2', 'emoji3', '']