JSFiddle - React, Tailwind, and code Playground

by Oleg Lazarev

JavaScript

// Note: `a` is a BMP symbol.
console.log(/a{2}/u.test('aa'));
// β†’ true

// Note: `πŒ†` is an astral symbol.
console.log(/πŒ†{2}/u.test('πŒ†πŒ†'));
// β†’ true