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+(?=\b(?:dark|\d+)\b)
/
gm
Input 1
1
This is a dark chocolate which is sweet This is a darkest dark chocolate which is sweet Sky is blue 1234 Sky is cloudy 3423 Stars can be seen in the dark sky Schools are closed 4568 but shops are open Contains no split word
Extraction
This is a dark chocolate which is sweet This is a darkest dark chocolate which is sweet Sky is blue 1234 Sky is cloudy 3423 Stars can be seen in the dark sky Schools are closed 4568 but shops are open Contains no split word