Regular Expressions 101

Community Patterns

1...34567...877

Trimmed (no unicode space separators at start or end of string

0

Regular Expression
ECMAScript (JavaScript)

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

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 - a year ago