JSFiddle - React, Tailwind, and code Playground

by Oleg Lazarev

JavaScript

const regex = /^\S$/u;
console.log(
	regex.test(' '), // false
	regex.test('a'), // true
	// Note: `𝌆` is an astral symbol.
	regex.test('𝌆')  // true
);