JSFiddle - React, Tailwind, and code Playground
by Oleg Lazarev
JavaScript
// Note: `๐` is an astral symbol.
const regex = /^[bc๐]$/u; // Or, `/^[bc\u{1D306}]$/u`.
console.log(
regex.test('a'), // false
regex.test('b'), // true
regex.test('c'), // true
regex.test('๐') // true
);