Test, validate and match regular expressions
Parses subtitle blocks in SRT (SubRip) files by capturing four groups: the sequence number, the start timestamp, the end timestamp (both in HH:MM:SS.mmm format), and the subtitle text. The dot in the timestamp acts as a wildcard, so it matches both comma and period millisecond separators. The 's' flag allows the text group to span multiple lines, while the 'g' flag processes every block in the file, making it ideal for subtitle extraction or conversion tools.