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 on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: String task


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: String task
Date   Fri, 1 Apr 2011 19:32:29 +0100

Not clear what you want here. But

. replace var1 = subinstr(var1, `"""', "", .)

removes " characters.

. replace var1 = subinstr(var1, "'", "", .)

removes ' characters.

If you wish to refer to " characters, you must use compound double
quotes `" "' as delimiters.

Nick.


On Fri, Apr 1, 2011 at 7:24 PM, Daniel Marcelino <dmsilva.br@gmail.com> wrote:
> Now I'm troubling to drop out a remain part of quote " and '  from
> string. How can I weit it inside of quotes. Stata return me an error
> too few quotes
> r(132);
>
>
> replace TSEid = subinstr(TSEid, " " ", "", .)
>
>

*
*   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   |   Site index