Parsing srt subtitles

后端 未结 6 1763
粉色の甜心
粉色の甜心 2021-02-08 12:31

I want to parse srt subtitles:

    1
    00:00:12,815 --> 00:00:14,509
    Chlapi, jak to jde s
    těma pracovníma světlama?.

    2
    00:00:14,815 -->          


        
6条回答
  •  执笔经年
    2021-02-08 13:04

    The text is followed by an empty line, or the end of file. So you can use:

    r' .... (?P.*?)(\n\n|$)'
    

提交回复
热议问题