Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Created·2023-05-05 01:36
Flavor·ECMAScript (JavaScript)

/
^(?!^[\p{Z}]|.*[\p{Z}]$).*$
/
gmu
Open regex in editor

Description

Disallows all space-like characters -- see https://www.fileformat.info/info/unicode/category/Zs/list.htm -- at the start or end of the string

Submitted by anonymous