Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
^(?<NR>\d+)\n(?<START>\d\d:\d\d:\d\d,\d\d\d)(?>\s?-->\s?)(?<END>\d\d:\d\d:\d\d,\d\d\d)\n(?<STRING>(?>.+\n?)+)
/
mg

Description

Extract subtitle entries out of SRT files.

Submitted by anonymous - 2 years ago