Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
(?:^|(?<=\n))([0-2]\d:[0-5]\d:[0-5]\d[.,]\d{3}) --> ([0-2]\d:[0-5]\d:[0-5]\d[.,]\d{3})(.*?)((?:\d+\n)?(?=[0-2]\d:[0-5]\d:[0-5]\d[.,]\d{3})|$)
/
gs

Description

(?:^|(?<=\n))([0-2]\d:[0-5]\d:[0-5]\d[.,]\d{3}) --> ([0-2]\d:[0-5]\d:[0-5]\d[.,]\d{3})(.*?)((?:\d+\n)?(?=[0-2]\d:[0-5]\d:[0-5]\d[.,]\d{3})|$)

Submitted by anonymous - 2 years ago