Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Carlos Avellaneda Suárez <carlos.avellaneda8@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | st: String problem |
Date | Tue, 18 Mar 2014 10:22:08 -0500 |
Dear Statalist, I have to merge several datasets where my key variable is a string variable, with no specific rule about the length of each string observation. The problem is that there are some characters (i.e. */) that are mistakenly added at the end of some observations. I would like to know how to eliminate those characters because they are causing me troubles when I merge the datasets. I am sorry if this is a basic question, but I have never faced this problem before and I don't know how to solve it. Here is an example of what I have: ref WG1855515 WG1855515*/ WIN18555R15 WIN18555R15*/ PCAV PCAV*/ HKK20560R16 HKK20560R16*/ Here is what I would like to obtain: ref WG1855515 WG1855515 WIN18555R15 WIN18555R15 PCAV PCAV HKK20560R16 HKK20560R16 Any help is highly appreciated. Best regards. Carlos * * 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/