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]);
// β 'π'