Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: extract string portion


From   thomas bourveau <thomas.bourveau@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: extract string portion
Date   Tue, 27 Nov 2012 11:14:09 +0100

Dear Statalist,

I am working on a dataset where I need to extract an identifier for
the parent company of my observations. Here are two examples:

OnlineChoice.com, Inc. (Exelon Corporation (NYSE:EXC))
Peppers & Rogers Group (TeleTech Holdings Inc. (NasdaqGS:TTEC))

As you can see the dataset provides the name of the company, its stock
exchange and its identifier (the Ticker) in the same row.

I'm interested in retrieving the Ticker (EXC and TTEC in the
abovementioned examples).

I have read some things on using the regex command to extract figures
from a string expression, but I did not found how to select only a
string portion of it.

If anyone has an idea, I will be grateful and try to implement it.

Thanks
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index