JSFiddle - React, Tailwind, and code Playground

by Oleg Lazarev

JavaScript

// Note: `πŒ†` is U+1D306 TETRAGRAM FOR CENTRE, an astral symbol.
const string = 'aπŒ†b';

console.log(/a.b/.test(string));
// β†’ false

console.log(/a.b/u.test(string));
// β†’ true

const match = string.match(/a(.)b/u);
console.log(match[1]);
// β†’ 'πŒ†'