G
glvs
Hi,
I need to split the input data based on lines that start with a valid
date.
Example:
Input:
1/2/03:note 1
note 2 note 3
01/2/2004 another note
note line2
note line3
5-03-99 this is a note from 1999
Output:
Date: 1/2/03
note1
note2 note3
Date: 01/2/2004
another note
note line2
note line3
Date: 5-03-99
this is a note from 1999
This is tricky because dates can be in different formats (1 digit month
instead of 2, for example). Is there any easy way to do this in Perl?
Thanks,
Glenn
I need to split the input data based on lines that start with a valid
date.
Example:
Input:
1/2/03:note 1
note 2 note 3
01/2/2004 another note
note line2
note line3
5-03-99 this is a note from 1999
Output:
Date: 1/2/03
note1
note2 note3
Date: 01/2/2004
another note
note line2
note line3
Date: 5-03-99
this is a note from 1999
This is tricky because dates can be in different formats (1 digit month
instead of 2, for example). Is there any easy way to do this in Perl?
Thanks,
Glenn