Regular Expressions 101

Community Patterns

1...34567...902

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