Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Text File Parser- what is it?

  Asked By: Carolina    Date: Sep 30    Category: MS Office    Views: 936
  

What is a text file parser? How does it work, basically?

Share: 

 

3 Answers Found

 
Answer #1    Answered By: Abagail Cohen     Answered On: Sep 30

text  parser basically takes a continuous flow of text-based input
and breaks it down or extracts it into various pieces. The key to
that extraction is having recognizable (and consistent) delimiters or
patterns.

I think the biggest problem you'd have would be whether or not various
obituaries have a consistent enough pattern to extract the data,
especially across various publications. You could certainly look for
key phrases like "passed away" or "born" or "survived by" to parse the
data into pieces, then parse those apart with other delimiters. For
example, once you found "survived by", a semi-colon could be used to
delimit between each type of survivor, as in:

 
Answer #2    Answered By: Daisy Phillips     Answered On: Sep 30
 
Answer #3    Answered By: Keiko Mori     Answered On: Sep 30

The Line Input reads a single record. The Loop command a few lines down
sends control back to the Do While command. This continues until and End of
File (EOF) is detected.



You can do a trim on the line and use its' length to determine if the line
is empty and then skip processing.



Through each loop, you can set a flag indicating what you are expecting and
process each line differently. For some of the rows, you can check the first
few characters for MOBILE or ATTACH to make sure you are on track.



Or you could read each set into an array and then process the array when you
read the start of a new set or EOF.

 
Didn't find what you were looking for? Find more on Text File Parser- what is it? Or get search suggestion and latest updates.




Tagged: