H
HammerJoe
I wonder if anyone could get me started on how to parse the text body
of an email.
The body looks like this:
--------------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-------------
|Sunday |Monday |Tuesday |Wednesday |
Thursday |Friday |Saturday |
|03/09/08 |03/10/08 |03/11/08 |03/12/08 |
03/13/08 |03/14/08 |03/15/08 |
--------------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-------------
7550 |OFF | 0930-1730| 0900-1700| 0900-1700|
0930-1730| 0930-1730|OFF |
Joe, Hammer |L 1400-1500|T 0900-1300|T 0900-1300|L 1400-1500|
L 1400-1500| |
| | |L 1300-1400|L
1300-1400| | | |
| | |T 1400-1700|T
1400-1700| | | |
--------------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-------------
(I apologize if it doesnt show correctly, but the lines are all
aligned.)
The email contains a list of schedules for several people.
I can get the email and treat as a text file.
The first 'column' is dependent on the longest name of all the
individuals, the weekly 'columns' are static in size but as you can
see they can have several 'rows'.
These events are triggered by a letter code in front of the hour.
I need to parse each person and find any special events and make a
table out of them
In my example I need to look for all the times that have a 'T', for ie
Tuesday 0900-1300 and 1400-1700 is what I need to collect.
I have been playing with this for awhile and all I come up is a messy
spaghetti code and I not getting anywhere.
My difficulty is that the info is not located in the same place but it
is dynamic the #of rows are different, the starting coloumn is
different, etc.
I would appreciate any help that would get me started on this.
Thanks.
of an email.
The body looks like this:
--------------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-------------
|Sunday |Monday |Tuesday |Wednesday |
Thursday |Friday |Saturday |
|03/09/08 |03/10/08 |03/11/08 |03/12/08 |
03/13/08 |03/14/08 |03/15/08 |
--------------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-------------
7550 |OFF | 0930-1730| 0900-1700| 0900-1700|
0930-1730| 0930-1730|OFF |
Joe, Hammer |L 1400-1500|T 0900-1300|T 0900-1300|L 1400-1500|
L 1400-1500| |
| | |L 1300-1400|L
1300-1400| | | |
| | |T 1400-1700|T
1400-1700| | | |
--------------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-------------
(I apologize if it doesnt show correctly, but the lines are all
aligned.)
The email contains a list of schedules for several people.
I can get the email and treat as a text file.
The first 'column' is dependent on the longest name of all the
individuals, the weekly 'columns' are static in size but as you can
see they can have several 'rows'.
These events are triggered by a letter code in front of the hour.
I need to parse each person and find any special events and make a
table out of them
In my example I need to look for all the times that have a 'T', for ie
Tuesday 0900-1300 and 1400-1700 is what I need to collect.
I have been playing with this for awhile and all I come up is a messy
spaghetti code and I not getting anywhere.
My difficulty is that the info is not located in the same place but it
is dynamic the #of rows are different, the starting coloumn is
different, etc.
I would appreciate any help that would get me started on this.
Thanks.