wiki/content/20201110095139-javascript_regexp_u_flag.md

12 lines
212 B
Markdown
Raw Normal View History

2024-05-06 20:40:05 +00:00
---
2024-10-30 17:04:36 +00:00
date: 20201110
2024-05-06 20:40:05 +00:00
id: 76fc0a0a-7d56-49c7-8c57-7686cca110fc
title: JavaScript RegExp /u flag
---
This flag matches astral characters such as emojis:
``` javascript
console.log(/^.$/u.test("🙂")); // true
```