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, is already up and running.

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

Re: st: Compound double quote

From   Nick Cox <>
Subject   Re: st: Compound double quote
Date   Mon, 20 Aug 2012 16:56:50 +0100

The first token of

"AMC Concord", 2, 4

even when parsing on commas is reported as

AMC Concord

as Stata's tendency is to strip " " as delimiters at each level of
parsing. To insist that " " are included as part of the token, I think
you need to start with

local line `" `""AMC Concord""', 2, 4 "'
tokenize `"`line'"', parse(",")
di `"`1'"'

Appropriate thanks would to be stop misspelling "Thanks" !


On Mon, Aug 20, 2012 at 4:34 PM, tashi lama <> wrote:
>    Could someone help me with the following
> local line "AMC Concord", 2, 4
> tokenize `"`line'"', parse(",")
> di `"`1'"'
> AMC Concord  (I was hoping to get "AMC Concord" with double quotation). Any idea?
*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index