Regular Expressions 101

Community Patterns

Community Library Entry

2

Regular Expression
Created·2014-01-11 19:33
Flavor·PCRE (Legacy)

/
([0-9]+)\n([0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}) --> ([0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3})\n(.*?)\n\n
/
gs
Open regex in editor

Description

Matches id, timecode and text for multiple subtitles. Make sure the source ends with a blank line to capture the last subtitle.

Submitted by Fergo