Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
^[ ]+|[ ]+$
/
gm

Description

Remove leading and trailing spaces from multiline text.

Submitted by Freemen Muaddib - 2 years ago