2 回答

TA貢獻(xiàn)1779條經(jīng)驗(yàn) 獲得超6個(gè)贊
匹配所有表情符號的正則表達(dá)式:
/(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])/g
您可以在這里進(jìn)行測試: https: //www.regextester.com/106421

TA貢獻(xiàn)1786條經(jīng)驗(yàn) 獲得超11個(gè)贊
是的,本質(zhì)上它是你所擁有的更大版本,從最長到最短的順序排列。 注意:Emoji-Regex 并不總是與膚色或復(fù)合表情符號(例如??????? 或???♀? 等)正確匹配。
模式:
/(?:|?????♂?|?????♂?|?????♂?|?????♂?|?????♂?|?????♀?|?????♀?|?????♀?|?????♀?|?????♀?|?????♂?|?????♂?|?????♂?|?????♂?|?????♂?|?????♀?|?????♀?|?????♀?|?????♀?|?????♀?|?????♂?|?????♂?|?????♂?|?????♂?|?????♂?|?????♀?|?????♀?|?????♀?|?????♀?|?????♀?|?????♂?|?????♂?|?????♂?|?????♂?|?????♂?|?????♀?|?????♀?|?????♀?|?????♀?|?????♀?|?????♂?|?????♂?|?????♂?|?????♂?|?????♂?|?????♀?|?????♀?|?????♀?|?????♀?|?????♀?|?????♂?|?????♂?|?????♂?|?????♂?|?????♂?|?????♀?|?????♀?|?????♀?|?????♀?|?????♀?|??????|????♂?|????♀?|????♂?|????♀?|????♂?|????♀?|??????|??????|????♂?|????♂?|????♂?|????♂?|????♂?|????♀?|????♀?|????♀?|????♀?|????♀?|?????|?????|?????|?????|???♂?|???♀?|?????|?????|?????|?????|?????|?????|?????|?????|?????|?????|?????|?????|???♀?|???♂?|???♂?|???♀?|???♂?|???♀?|???♂?|???♀?|???♂?|???♀?|???♂?|???♀?|???♂?|???♀?|???♂?|???♀?|???♂?|???♀?|???♂?|???♀?|???♂?|???♀?|?????|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|??|???|?|?|?|?|?|?|?|?|?|?|?|?|?|?|?|?|?|?|?|?|?|?|?|?| ?|?|?|?|?|?|?|?|?|?|?|?|?|?|?|?|?|☉|?|?|?|?|?|?|?| ?|?|?|?|?|?|?|?|?|?|?|↗|?|↘|?|↙|?|↖|?|?|?|?|?|?|?| ?|?|?|?|?|?|?|?|?|?|?|?|?|?|?|?|?|?|?|?|?|?|?|?|?| ?|?|?|?|?|?|?|?|♀|♂|?|?|?|?|?|?|?|?|?|?|?|?|?|?|?| ?|?|?|?|?|?|?|?|?|?|?|?|?|?|?|?|?|?|祝|秘|?|?|?|?|?| ?|?|?|?|?)/
有關(guān)詳細(xì)信息,請參閱https://github.com/sweaver2112/Regex-combined-emojis

TA貢獻(xiàn)1856條經(jīng)驗(yàn) 獲得超11個(gè)贊
message.content.match(/(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])/g);
添加回答
舉報(bào)