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
/
\d{3}(?!.*?-)[\s\S]*?Download[\s\S]*?(?=\d)
/
gm
Input 1
1
New
1 00:00:39,243 --> 00:00:45,820 This line is ok 2 00:00:46,243 --> 00:00:51,820 This line with "Ads" word should be deleted and its next line 3 00:01:04,243 --> 00:01:05,820 This line with "Download" word should be deleted and its next line 4 00:01:08,664 --> 00:01:12,331 An ok line
Substitution
1 00:00:39,243 --> 00:00:45,820 This line is ok 2 00:00:46,243 --> 00:00:51,820 This line with "Ads" word should be deleted and its next line 3 00:01:04,243 --> 00:01:05,820 This line with "Download" word should be deleted and its next line 4 00:01:08,664 --> 00:01:12,331 An ok line