mirror of
https://github.com/alrayyes/wiki.git
synced 2024-12-01 15:26:23 +00:00
11 lines
197 B
Markdown
11 lines
197 B
Markdown
|
---
|
||
|
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
|
||
|
```
|