想做srt文件解析,求一个优雅的解决方案
输入是一个字符串:
1
↵00:00:05,150 --> 00:00:07,700
↵What an incredible beautiful day.
↵真是风和日丽的一天。
输出一个 Obj:
{
indexNum: 1,
startStr: '00:00:05,150',
endStr: '00:00:07,700',
engStr: 'What an incredible beautiful day.',
chiStr: '真是风和日丽的一天。'
}
求优雅一点