Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Community Library
How to contribute
x
Remove leading and trailing spaces
Open Workspace
JavaScript
Substitution
Created 2022-07-02 17:29
0
Regular Expression
/
^
[
]
+
|
[
]
+
$
/
gm
Description
Remove leading and trailing spaces from multiline text.
Submitted by
Freemen Muaddib