Google Answers Logo
View Question
 
Q: Parsing Text ( Answered,   0 Comments )
Question  
Subject: Parsing Text
Category: Computers > Programming
Asked by: wschubbe-ga
List Price: $10.00
Posted: 21 Mar 2006 21:04 PST
Expires: 20 Apr 2006 22:04 PDT
Question ID: 710371
Hello,

I need help extracting and reformatting some text.

This is the raw text:

Return to the top of your schedule.
Pairing ID:	C8253	Start Date:	20060131
Date	Flight	Aircraft	DH:Locator:Fare	Orig	Dest	Dep Time	Arr Time	OA	A/C	Blk	Cdt	Dty
0131	 4215	 N308TZ		MDW	DFW	12:42	14:55	 	308	02:13	02:24	 
0131	 4208	 N308TZ		DFW	MDW	15:58	18:01	 	308	02:03	02:09	 
 	Duty Info	 		 	 	R11:43	E18:24	 	Duty	04:16	04:33	06:33
 	 	 	Sked/Act Credit	 	 	 	 	 	05:00/	05:00	 
Return to the top of your schedule.
Pairing ID:	C8215	Start Date:	20060201
Date	Flight	Aircraft	DH:Locator:Fare	Orig	Dest	Dep Time	Arr Time	OA	A/C	Blk	Cdt	Dty
0201	 4216	 N314TZ		MDW	LGA	16:04	19:14	 	314	02:10	02:10	 
 	Duty Info	 		 	L10:35	R15:05	E19:25	 	Duty	02:10	02:10	03:24
0202	 4225	 N304TZ		LGA	MDW	07:03	08:34	 	304	02:31	02:31	 
 	Duty Info	 		 	 	R06:00	E08:35	 	Duty	02:31	02:31	03:49
 	 	 	Sked/Act Credit	 	 	 	 	 	10:00/	10:00	 
Return to the top of your schedule.
Pairing ID:	C8285A	Start Date:	20060207
Date	Flight	Aircraft	DH:Locator:Fare	Orig	Dest	Dep Time	Arr Time	OA	A/C	Blk	Cdt	Dty
0207	 7003	 N332TZ		MDW	IND	22:48	00:33	 	332	00:45	00:55	 
 	Duty Info	 		 	L13:11	R22:04	E01:44	 	Duty	00:45	00:55	01:44
0208	2779	 	S:FF/SELF:$91.29	IND	MDW	15:55	15:45	WN	 	00:00	00:25	 
 	Duty Info	 		 	 	R14:55	E16:00	 	Duty	00:00	01:00	02:05
 	 	 	Sked/Act Credit	 	 	 	 	 	10:00/	10:00	 
Return to the top of your schedule.
Pairing ID:	C8008	Start Date:	20060210
Date	Flight	Aircraft	DH:Locator:Fare	Orig	Dest	Dep Time	Arr Time	OA	A/C	Blk	Cdt	Dty
0210	 4592	 N323TZ		MDW	RSW	07:10	11:03	 	323	02:53	02:53	 
0210	 4601	 N323TZ		RSW	MDW	11:56	13:47	 	323	02:51	02:51	 
0210	 4206	 N308TZ		MDW	LGA	17:19	20:21	 	308	02:02	02:02	 
 	Duty Info	 		 	L10:22	R06:10	E20:37	 	Duty	07:46	07:46	13:26
0211	 4217	 N308TZ		LGA	MDW	07:50	09:05	 	308	02:15	02:16	 
 	Duty Info	 		 	 	R06:59	E09:30	 	Duty	02:15	02:16	03:21
 	 	 	Sked/Act Credit	 	 	 	 	 	10:00/	10:02	 
Return to the top of your schedule.
Pairing ID:	C8022	Start Date:	20060220
Date	Flight	Aircraft	DH:Locator:Fare	Orig	Dest	Dep Time	Arr Time	OA	A/C	Blk	Cdt	Dty
0220	 4089	 N310TZ		MDW	GDL	09:28	14:13	 	310	04:45	04:45	 
0220	 4088	 N310TZ		GDL	MDW	15:00	18:27	 	310	03:27	03:49	 
 	Duty Info	 		 	 	R08:10	E18:49	 	Duty	08:12	08:34	10:47
 	 	 	Sked/Act Credit	 	 	 	 	 	07:59/	08:34	 

Out of that mess I need each flight extracted and formatted as follows:

Flight Date (mm/dd/yyyy), Flight #, Dep. City, Dep. Time, Arr. City, Arr. Time.

example from first row:

01/31/2006 4215 MDW 1242 DFW 1455

Request for Question Clarification by efn-ga on 21 Mar 2006 21:40 PST
What kind of help do you seek?  Are you looking for a custom program,
or for assistance in writing a program yourself, or something else?
Answer  
Subject: Re: Parsing Text
Answered By: palitoy-ga on 22 Mar 2006 01:29 PST
 
Hello wschubbe-ga,

Thank-you for your question.

I have formatted the data you posted into the format you require and
pasted it below.  If you require any further assistance on this
subject please do not hesitate to ask for clarification.

01/31/2006 4215 MDW 1242 DFW 1455
01/31/2006 4208 DFW 1558 MDW 1801
02/01/2006 4216 MDW 1604 LGA 1914
02/02/2006 4225 LGA 0703 MDW 0834
02/07/2006 7003 MDW 2248 IND 0033
02/08/2006 2779 IND 1555 MDW 1545
02/10/2006 4592 MDW 0710 RSW 1103
02/10/2006 4601 RSW 1156 MDW 1347
02/10/2006 4206 MDW 1719 LGA 2021
02/11/2006 4217 LGA 0750 MDW 0905
02/20/2006 4089 MDW 0928 GDL 1413
02/20/2006 4088 GDL 1500 MDW 1827

Request for Answer Clarification by wschubbe-ga on 05 Apr 2006 21:17 PDT
I am looking for a script or the sort that would format the text from
my initial request to what you have posted.  I have to deal with this
conversion as an ongoing basis.  I can pull the text into text edit
easily as formatted above, just getting from that point is where I am
stuck.  As for the program, text edit or word would work for me.

Thanks

Request for Answer Clarification by wschubbe-ga on 05 Apr 2006 21:19 PDT
And sorry it took so long to get back with you, I did not receive
notification of activity on the request.

Clarification of Answer by palitoy-ga on 06 Apr 2006 01:36 PDT
What language do you require the script to be in?  It was not
specified in the question that a script was required.

It is likely that it will take more time than a $10 would warrant for
a script to be written.  Please refer to the Google Answers FAQ below:
http://answers.google.com/answers/pricing.html

I would estimate the time required to be approximately 2 hours for a
fully tested script whereas a $10 question suggests a 30 minute answer
which is what was supplied by parsing the information you supplied.

Please let me know the language you require the script to be written
in and I will see what I can do.
Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy