...

View Full Version : Parsing Text File



Jack Higgins
02-10-2012, 09:17 PM
Hi,

I was wondering if I could get some advice on the most efficient way I can parse a text file which contains the following pair:

<String LABEL:> Paragraph

For example:

PAGENUMBER: 1
TEXT: text with multiple lines
TEXT: some more text
PAGENUMBER: 2 TEXT: random te:xt here with colon just to add some spice
PAGENUMBER: 3

I was wondering what might be the best way to do this: I could tokenize on ":" but only if it matches with a specific label like TEXT or PAGENUMBER.

Thank you for your help,
Jack Higgins.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum