I have a file with following text structure and would like to parse date inside into an array ...
21/5/12 14:23:36: A: XXXX
YYY
ZZZ
21/5/12 14:23:25: B: XXX ZZZ YYY
21/5/12 14:23:25: B: XXX ZZZ YYY
I am using data.match(/[^\r\n]+\d+.*/g) to parse data from file and the result is
arr[0], 21/5/12 14:23:36: A: XXXX
arr[1], 21/5/12 14:23:25: B: XXX ZZZ YYY
arr[2], 21/5/12 14:23:25: B: XXX ZZZ YYY
Some text of the first item has been removed which is not desired.
Is it possible to use regular expression to parse the text like this?