JSFiddle - React, Tailwind, and code Playground

by Oleg Lazarev

JavaScript

// Note: `𝌆` is an astral symbol.
const regex = /^[bc𝌆]$/;
console.log(
	regex.test('a'), // false
	regex.test('b'), // true
	regex.test('c'), // true
	regex.test('𝌆')  // false
);

// Объяснение: регулярное выражение эквивалентно следующему.
// const regex = /^[bc\uD834\uDF06]$/;