Find and replace, insert tab before

  • Thread starter Stephen K. Miyasato
  • Start date
S

Stephen K. Miyasato

I trying to parse this into a database and was trying to use the find and
replace to insert tab characters such that I can then programmatically parse
the data. This is a rtf file that has Indenting to indicate a sub field. For
example, Aberrant is the main topic. Adrenal gland is a subtopic and under
the paragraph heading Indentation is 0.25, Hanging by 0.5, the main topic is
left 0 hanging 0.75, the third subtopic is indent 0.5 hanging indent 0.5

Abduction contracture, hip or other joint - see Contraction, joint

Abercrombie's syndrome (amyloid degeneration) 277.3

Aberrant (congenital) - see also Malposition, congenital indent 0
hanging 0.75

adrenal gland 759.1 indent 0.25, Hanging indent 0.5 style
H2

blood vessel NEC 747.60

arteriovenous NEC 747.60

cerebrovascular 747.81 indent 0.5 hanging indent 0.5 style H3

gastrointestinal 747.61

lower limb 747.64

renal 747.62

spinal 747.82

upper limb 747.63

breast 757.6

endocrine gland NEC 759.2



I tried using format and got it to find the line. I want to insert a tab ^t
before each subheading and two tabs on the third heading. The idea is such
that I can insert each into a field in the database.



When I initially tried to import it, the conversion would not recognize the
paragraph markers.



I tried using XML but this caused errors .



You can download the file from here.

http://ftp.cdc.gov/pub/Health_Statistics/NCHS/Publications/ICD9-CM/2005/dindex06.zip



Any help appreciated.



Stephen K. Miyasato
Word 2003
 
N

nohogumbo

Two suggestions:

1. When doing the Find and Replace, I would suggest setting the Find
What to look for the Style (H2, for example) and setting the Replace
with to ^t^& (which puts a tab in front of whatever text is found). For
H3 you would replace with ^t^t^& and so forth.

2. In order to import the text, you may need to save the file as a text
file rather than rtf. I don't know what type of database you are using
but I have encountered issues in the past with importing data and found
that the data needed to be in a true text file format to import
properly.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Find and replace 5

Top