JSFiddle - React, Tailwind, and code Playground
by Oleg Lazarev
JavaScript
const regex = /^\S$/;
console.log(
regex.test(' '), // false
regex.test('a'), // true
// Note: `๐` is an astral symbol.
regex.test('๐') // false
);
by Oleg Lazarev
const regex = /^\S$/;
console.log(
regex.test(' '), // false
regex.test('a'), // true
// Note: `๐` is an astral symbol.
regex.test('๐') // false
);