Extracts the subtitle text from VTT files.
Details
-0
indicate the start of a paragraphRegular expression used in the process:
Number | Regular Expression | Replace |
---|---|---|
0 | /^(.*-0)[^\S\r\n]*$/gm | "\n$1" |
1 | /^[^\S\r\n]+$/gm | "" |
2 | /\n(?:[^\r\n]*\n)?[^\r\n]*-->[^\r\n]*\n/g | "" |
3 | /^([^\r\n]+)\n(?!\n)/gm | "$1 " |
4 | /^\s*|\s*$/g | "" |
-0
in the sequence line (ignoring trailing whitespace).