Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
([ \t]*(?: )+[ \t]*| +[ \t]+|\t+ +[ \t]*)
/
gm
Input 1
1
The fat cat sat on the mat. Th e fat cat sat on the mat. The fat cat sat on the mat. The fat cat sat on the mat.
Substitution
The fat cat sat on the mat. Th e fat cat sat on the mat. The fat cat sat on the mat. The fat cat sat on the mat.