Lesley's Digital Garden

Home

❯

Notes

❯

matching unicode properties in regex

matching unicode properties in regex

May 03, 2025

  • parent : regex
  • tools/regex

Test whether a string contains an emoji:

/\p{Emoji}/u.test("πŸ‡°πŸ‡·");

Specific writing script:

/\p{Script=Hangul}/u.test("μ•ˆλ…•ν•˜μ„Έμš”");

Reference

  • Unicode: flag β€œu” and class \p{…}
  • Notes – 07:02 Sat 3 May 2025 – David Bushell – Web Dev (UK)

Graph View

Backlinks

  • regular expression

Created with Quartz v4.5.2 Β© 2026. All notes are written in Obsidian.

  • GitHub Repository
  • Mastodon