//第一种
var fs = require('fs');
fs.readFile('./lry.txt',function (err,data) {
if (err) {
throw err;
}
(function iterator(i){
var line = data.toString().split('\n');
// console.log(line.length);
// [02:53.60] 我想一起越过所有困难和阻挡
var reg = /\[(\d{2}):(\d{2})\.(\d{2})\]\s(.*)/;
if (i == line.length) {
return;
}
if (reg.exec(line[i])) {
var arr = reg.exec(line[i]);
var min = parseFloat(arr[1]);
var second = parseFloat(arr[2]);
var msec = parseFloat(arr[3]);
var content = arr[4];
// console.log(arr[0]);
time = min * 60 * 1000