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]);
// โ†’ '๐Œ†'