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
);