emoji表情其实就是四位的unicode
所以我们可以通过unicode来识别emoji表情
<U+1F300> - <U+1F5FF> # symbols & pictographs
<U+1F600> - <U+1F64F> # emoticons
<U+1F680> - <U+1F6FF> # transport & map symbols
<U+2600> - <U+2B55> # other
写成一个就是:
/(\ud83c[\udf00-\udfff])|(\ud83d[\udc00-\ude4f\ude80-\udeff])|[\u2600-\u2B55]/g