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
);