Parsing text from a word doc by keywords to an Oracle table

T

tblair

I have text doc that I want to parse out certain data in to an oracle
table.

What I would like to do is search the doc by keyword, then grab all
text between the keywords and update a column in a table.

Below is sample of what the text doc would look like.

The keywords I am looking for are:
-Project Number
-Title
-Market Segment(s)
-Product Segment(s)
-Product(s)
-Description


Text Doc Example:
Project Number B1F0050 TitleTREATMENT OF FINANCE CHARGE DEBIT
ADJUSTMENTS
Market Segment(s)CREDIT

Product Segment(s)CUSTOMER CORRESPONDENCE
OMAHA MERCHANT/DEBIT
USAGE, RETENTION & MARKETING

Product(s)INFOSIGHT (NOAH)
LEGAL/REGULATORY COMPLIANCE
ONLINE PCF
CARDHOLDER POSTING & MASTERFILE
STATEMENTS
MONETARIES

DescriptionFinance charge debit adjustments that are manually
entered will
be identified and treated as finance charges to comply with
Regulation Z.
Currently, manual debit adjustments post as sales.

Does anyone have any suggestions on how to do this. I would need help
with the code that loops through the text doc, grabs the text between
keywords and the code to connect to and update the oracle table.
 
W

Word Heretic

G'day (e-mail address removed) (tblair),


use two range objects. The first to capture the first instance and the
second to capture the second instance. 2nd is made easier by starting
the range at the end of the first and using .content.end for its end
before the search to limit it to that range.

Then your desired range is end of first to start of second.


(e-mail address removed) (tblair) was spinning this yarn:
I have text doc that I want to parse out certain data in to an oracle
table.

What I would like to do is search the doc by keyword, then grab all
text between the keywords and update a column in a table.

Below is sample of what the text doc would look like.

The keywords I am looking for are:
-Project Number
-Title
-Market Segment(s)
-Product Segment(s)
-Product(s)
-Description


Text Doc Example:
Project Number B1F0050 TitleTREATMENT OF FINANCE CHARGE DEBIT
ADJUSTMENTS
Market Segment(s)CREDIT

Product Segment(s)CUSTOMER CORRESPONDENCE
OMAHA MERCHANT/DEBIT
USAGE, RETENTION & MARKETING

Product(s)INFOSIGHT (NOAH)
LEGAL/REGULATORY COMPLIANCE
ONLINE PCF
CARDHOLDER POSTING & MASTERFILE
STATEMENTS
MONETARIES

DescriptionFinance charge debit adjustments that are manually
entered will
be identified and treated as finance charges to comply with
Regulation Z.
Currently, manual debit adjustments post as sales.

Does anyone have any suggestions on how to do this. I would need help
with the code that loops through the text doc, grabs the text between
keywords and the code to connect to and update the oracle table.

Steve Hudson

Word Heretic, Sydney, Australia
Tricky stuff with Word or words for you.
wordheretic.com

Replies offlist may require payment.
 
Top