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
r"
\black (?!lack\b)\w+(?:[^\w,](?!lack\b)\w+){0,2}
"
gm
Input 1
1
New
lack of stair handrails, slippery surfaces, tripping hazards, lack of bathroom grab bars, lack floor lack lack stair handrails, slippery surfaces, tripping hazards, lack of bathroom lack bars, lack floor, lack lack
Substitution
lack of stair handrails, slippery surfaces, tripping hazards, lack of bathroom grab bars, lack floor lack lack stair handrails, slippery surfaces, tripping hazards, lack of bathroom lack bars, lack floor, lack lack