RegEx match .srt format

RegEx match .srt format

If you have a project and have to read .srt format in javascript – this is the post for you. This is the regular expression that matches the format in .srt files.

([0-9]+(?:.[0-9]*)?)[sS]*?(.*-->.*)[sS]*?(w+.*)[n|r]

test here – http://regexr.com?38d0s