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: Quote Quote Unquote Unquote??


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: Quote Quote Unquote Unquote??
Date   Wed, 23 Mar 2011 14:31:39 +0000 (GMT)

--- On Wed, 23/3/11, miyu Lee wrote:
> I want to remove all quote marks from my dataset, seems it
> doesnt work with the substring command.
> 
> For example, "replace variable = subinstr( variable, """, "
> ",.)"
> 
> (that is triple quotation marks) doesnt work, (rightly)
> saying "too few quotes"

see -help quotes- especially look at "compound quotes"

*------------- begin example ---------------
clear
input str5 foo
`""bar""'
end

list

replace foo = subinstr( foo, `"""', "",.)
list
*-------------- end example -----------------
(For more on examples I sent to the Statalist see: 
http://www.maartenbuis.nl/example_faq )

Hope this helps,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------


      

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