Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: trimming leading numbers from a string.


From   "Ashim Kapoor" <ashimkapoor@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: trimming leading numbers from a string.
Date   Tue, 23 Sep 2008 10:37:00 +0530

Hello everyone,


I have a string variable called "cname".

It looks something like this.

                 cname
1.        DELHI
2.    0 HYDERBAD
3.    1 USA
4.     4 AP

I want to remove the leading 0 / 1 / 4 / other numbers from this
string and keep only the alphabets. Is there a do file someone has
written on this ?

Thank you,
Ashim.
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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