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
"
entry \d+: (?:(?!entry \d+: ).)*special.*?(?=\s*entry \d+: |$)
"
gs
Input 1
1
New
entry 1: hello entry 2: world entry 3: this is a multiline that makes it hard entry 4: here we have a special entry entry 5: here we have another special entry in a multiline entry 6: end