Split text file into multiline string array using Regex

579 views Asked by At

I need to split an .srt file text like

1
00:02:10,437 --> 00:02:11,598
Day one, Greenie.

2
00:02:11,757 --> 00:02:12,838
Rise and shine.

3
00:02:14,357 --> 00:02:16,041
He looks like
a slopper to me.

split into multi-line string array, each string has at least 3 lines, one for the number, one for the time, and one or more for the text of the subtitles

can you help?

1

There are 1 answers

2
vks On
\n{2,}

Split by this and you have your result.