Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

我有更好的正则: 包含emoji #316

Open
qiaen opened this issue May 22, 2024 · 1 comment
Open

我有更好的正则: 包含emoji #316

qiaen opened this issue May 22, 2024 · 1 comment

Comments

@qiaen
Copy link

qiaen commented May 22, 2024

let iconRule = /(\ud83c[\udf00-\udfff])|(\ud83d[\udc00-\ude4f\ude80-\udeff])|[\u2600-\u2B55]/g
let r = iconRule.test('😯')
console.log(r) // true
@HandsomeWolf
Copy link

thank @qiaen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants