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
/
(^.*?)( )
/
gm
Input 1
1
New
This is a sentence Another sentence shall follow up And yet a third sentence The goal of these sentences is to show first spaces that pop up in different line positions then we'll use regular expressions to select that first space and then replace that space with first your insert character and then that space. This one starts with a space just to cover that useage scenario
Extraction