I'm having some trouble coming up with regular expressions for variables paragraph-start
and paragraph-separate
to do what I want (to be defined shortly). I'm editing *.srt
files (subtitles for school lectures) and trying to set my variables so that M - }
and M - {
take me up and back one block of text for editing. The file has the following format:
1
00:00:16,040 --> 00:00:23,130
Some text here that marks the beginning <--
of a block.
2
00:00:23,390 --> 00:00:28,230
(Speaker): And some more <--
3
00:00:28,230 --> 00:00:32,350
text here that also marks the <--
beginning of another block. There
could be multiple sentences in here.
I want to set variables paragraph-start
and paragraph-separate
in such a way that M-{
and M-}
(paragraph back and forward) take me between the beginning of the lines marked with <--
.
I tried to set paragraph-separate
to ".*-->.*"
(since the arrow never appears in the subtitles text) and paragraph-start
to match any after this line, but M-}
always seems to place me on the timestamps line (the one including the -->
), although I want to go to the line after it.
Any ideas what I'm doing wrong and how I can set the variables paragraph-start
and paragraph-separate
appropriately?