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
/
\s*(\.+|[[:punct:]])(?<!\b['’]\b)\s*
/
gm
Input 1
1
New
I want: spaces around all these marks;:!?.but i didn’t want it there in didn't
Extraction
I want: spaces around all these marks;:!?.but i didn’t want it there in didn't