Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Help on double or single quote search in a String


From   "MITRA PINAKI (MAR1PXM)" <mar1pxm@ups.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Help on double or single quote search in a String
Date   Tue, 26 Oct 2004 11:54:23 -0400

Hello List,

    I have a string variable which has double quotes and/or single quotes in
some of the values and I would like to delete and generate a new variable.

For example,
Old Name			New Name
Brad  Allred"s		Brad  Allreds
STEVEN" KROFF'		STEVEN KROFF

How can I put the double quote <"> and/or single quote <'> in the index
string function to search for and delete it? I can't figure out the trick to
search for quotes in a string variable; I get the error message "too few
quotes" in all my attempts. Can anyone please help me with this?

Thank you,
Pinaki

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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   |   What's new   |   Site index