Bookmark and Share

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

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

st: Removing quotation marks in string variables

From   John Adam Roberts <>
Subject   st: Removing quotation marks in string variables
Date   Fri, 5 Jul 2013 12:57:15 -0400


I have a dataset that is full of strings that look like this:

ATUS00001213, "ATUS00001256","Jackson,Collin"

I'm going to separate these values into different variables and I'm
wondering how to remove the "s from the dataset.

For other characters, like commas, I would use the following command:
replace tags = subinstr(tags,",","",.)

replace tags = subinstr(tags,""","",.)
replace tags = subinstr(tags,'"',"",.)
replace tags = subinstr(tags,""",.,.)
replace tags = subinstr(tags,'"',.,.)
don't work.

Thanks in advance for the help!

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index