Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
ECMAScript (JavaScript)

/
^\s*\d+\s*$(?:\r?\n?)+^\s*([\d:,\.]+)\s*-->\s*([\d:,\.]+)\s*$(?:\r?\n?)+((?:.*(?:\r?\n?)?)*?)(?:\r\n|\r|\n|$)
/

Description

Regex :

/^\s*\d+\s*$(?:\r?\n?)+^\s*([\d:,.]+)\s*-->\s*([\d:,.]+)\s*$(?:\r?\n?)+((?:.(?:\r?\n?)?)?)(?:\r\n|\r|\n|$)/gm;

Test String : 1 00:00:02,070 --> 00:00:8,572 (<i> explosion and number of members</i> )
(<i> inaudible radio chatter</i> )

Submitted by anonymous - 9 years ago