wiki/content/20201110095139-javascript_regexp_u_flag.md

212 B

date id title
20201110 76fc0a0a-7d56-49c7-8c57-7686cca110fc JavaScript RegExp /u flag

This flag matches astral characters such as emojis:

console.log(/^.$/u.test("🙂")); // true