Thanks, split seems to do the job. However now I have some special cases to
deal with. Say I have a company name like:
Medical Research, Inc.
I want to split this into
Medical
Research
Inc
So that the "," and the "." are dropped. I've tried combining -split- with
the -ignore- option, but it doesn't seem to be doing anything as the comma
and period remain in the split variables. Anyone know how to take care of
this?
Thanks,
Terra
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Michael Blasnik
Sent: Wednesday, September 28, 2005 5:16 PM
To: [email protected]
Subject: st: Re: breaking strings
help split
----- Original Message -----
From: "Terra Curtis" <[email protected]>
To: <[email protected]>
Sent: Wednesday, September 28, 2005 5:08 PM
Subject: st: breaking strings
> Dear Statalist,
>
> I am trying to find a string function (or equivalent series of code lines)
> to accomplish the following. I have a string variable which contains
> various company names, eli lilly & co, for example. I want to break this
> string into 4 separate data points, namely eli, lilly, &, co. The
> delimeter
> is a space. Anyone know how to do this?
>
> Thanks,
> Terra
>
> *
> * For searches and help try:
> * http://www.stata.com/support/faqs/res/findit.html
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/