Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
"
(\n\n|\A\n?)-\s*(?!.*\n-)
"
gm
Input 1
1
New
- Lovely day. - Lovely day-night cycle. - Lovely day. Isn't it? - lovely day - isn't it? - Lovely day - isn't it? Here are few example strings where leading dash character(s) should be retained (note the 2nd example, it might be tricky): - Lovely day. - Yeah, isn't it? Lovely day. - Yeah, isn't it? - lovely day - isn't it? - Yes. - Lovely day for a - - Walk?
Extraction