Home All Groups Group Topic Archive Search About

How do I remove an embedded Double quotes

Author
7 Oct 2006 9:34 PM
vvenk
Hello:

I am reading from a CSV file into a variable.

The variable reads as ""My data"" since the file contains "My data"

How do I get rid of the embedded double quotes?

I tried
         myString.Replace(chr(34), "")

It did not work even though Chr(34) occurs at 0 and 8.

Help would be appreciated.

venki

Author
7 Oct 2006 10:13 PM
Jay B. Harlow
vvenk
>         myString.Replace(chr(34), "")
String.Replace is a function that returns a new value with any replacements.

Have you tried:

    myString = myString.Replace(chr(34), "")

--
Hope this helps
Jay B. Harlow
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net


Show quoteHide quote
"vvenk" <vv***@discussions.microsoft.com> wrote in message
news:ED7241EF-6FE5-483D-901F-F0C9D0717C56@microsoft.com...
> Hello:
>
> I am reading from a CSV file into a variable.
>
> The variable reads as ""My data"" since the file contains "My data"
>
> How do I get rid of the embedded double quotes?
>
> I tried
>         myString.Replace(chr(34), "")
>
> It did not work even though Chr(34) occurs at 0 and 8.
>
> Help would be appreciated.
>
> venki
>
>
Author
8 Oct 2006 1:05 AM
vvenk
Jay:

How dumb could I be for overlooking such a simple mistake?

You are a Godsend! Thanks you.

venki

Show quoteHide quote
"Jay B. Harlow" wrote:

> vvenk
> >         myString.Replace(chr(34), "")
> String.Replace is a function that returns a new value with any replacements.
>
> Have you tried:
>
>     myString = myString.Replace(chr(34), "")
>
> --
> Hope this helps
> Jay B. Harlow
> ..NET Application Architect, Enthusiast, & Evangelist
> T.S. Bradley - http://www.tsbradley.net
>
>
> "vvenk" <vv***@discussions.microsoft.com> wrote in message
> news:ED7241EF-6FE5-483D-901F-F0C9D0717C56@microsoft.com...
> > Hello:
> >
> > I am reading from a CSV file into a variable.
> >
> > The variable reads as ""My data"" since the file contains "My data"
> >
> > How do I get rid of the embedded double quotes?
> >
> > I tried
> >         myString.Replace(chr(34), "")
> >
> > It did not work even though Chr(34) occurs at 0 and 8.
> >
> > Help would be appreciated.
> >
> > venki
> >
> >
>
>