Reputation: 25
I am editing a SRT Subtitles file in Notepad++ and need to remove all the "closed captions" parts (which are mainly used by the hearing disabled) eg.
354
00:03:11,108 --> 00:03:12,608
[Bang]
355
00:03:25,956 --> 00:03:27,248
They have not arrived
356
00:04:59,967 --> 00:05:02,301
[Television Plays]
357
00:03:25,956 --> 00:03:27,248
Mama.
358
00:03:27,332 --> 00:03:30,001
Mama!
359
00:04:25,641 --> 00:04:26,557
[Bang]
360
00:04:59,967 --> 00:05:02,301
[Car Door Closes]
so in the above text, all the lines with " [.....] " would be removed, I understand this can be done with regular expressions?
Upvotes: 0
Views: 1165
Reputation: 17351
Make sure the "regular expressions" option is checked.
Try replacing this regex:
^\[.*\]$
with an empty string.
If you want to delete the newlines too (to remove extra space/lines), do this instead:
^\[.*\]\r\n
Upvotes: 1