Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: RE: remove special characters from string


From   Skipper Seabold <[email protected]>
To   [email protected]
Subject   Re: st: RE: remove special characters from string
Date   Tue, 2 Nov 2010 16:09:14 -0400

On Tue, Nov 2, 2010 at 4:00 PM, Nick Cox <[email protected]> wrote:
> Intuition is the weaker part of documentation. See the -help- on -functions-, particularly string function.
>
> If they are just ..- then
>
> replace oldstring = subinstr(oldstring, ".", "",.)
> replace oldstring = subinstr(oldstring, "-", "",.)
>
> should do it.
>
> If the characters are exotic, then -charlist- from SSC is a utility to find out what they are.
>

Right.  Thanks.  Obviously I was overlooking subinstr.  Sorry for the noise.

Skipper
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index